From ecb7e5c8afe929ee38155db94de6b084ec32a645 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 16 Feb 2010 09:31:36 +0000 Subject: Update clang to r96341. --- www/analyzer/annotations.html | 34 +++++++----- www/analyzer/available_checks.html | 3 ++ www/analyzer/content.css | 30 +++++++++++ www/analyzer/dev_cxx.html | 52 +++++++++++++++++++ www/analyzer/filing_bugs.html | 8 +-- www/analyzer/images/analyzer_html.png | Bin 0 -> 63091 bytes www/analyzer/images/analyzer_xcode.png | Bin 0 -> 87697 bytes www/analyzer/images/tree/bullet.gif | Bin 0 -> 64 bytes www/analyzer/images/tree/minus.gif | Bin 0 -> 79 bytes www/analyzer/images/tree/plus.gif | Bin 0 -> 83 bytes www/analyzer/index.html | 25 +++++++-- www/analyzer/installation.html | 5 +- www/analyzer/latest_checker.html.incl | 2 +- www/analyzer/menu.css | 80 ++++++++++++++++------------ www/analyzer/menu.html.incl | 74 +++++++++++++------------- www/analyzer/menu.js | 17 ++++++ www/analyzer/scan-build.html | 42 ++++++++------- www/analyzer/scripts/dbtree.js | 1 + www/analyzer/scripts/menu.js | 17 ++++++ www/comparison.html | 3 +- www/cxx_status.html | 92 +++++++++++++++++++++++++++++++-- www/diagnostics.html | 29 ++++++++++- www/index.html | 16 +++--- 23 files changed, 402 insertions(+), 128 deletions(-) create mode 100644 www/analyzer/dev_cxx.html create mode 100644 www/analyzer/images/analyzer_html.png create mode 100644 www/analyzer/images/analyzer_xcode.png create mode 100644 www/analyzer/images/tree/bullet.gif create mode 100644 www/analyzer/images/tree/minus.gif create mode 100644 www/analyzer/images/tree/plus.gif create mode 100644 www/analyzer/menu.js create mode 100644 www/analyzer/scripts/dbtree.js create mode 100644 www/analyzer/scripts/menu.js (limited to 'www') diff --git a/www/analyzer/annotations.html b/www/analyzer/annotations.html index 819886e822cf..620471346365 100644 --- a/www/analyzer/annotations.html +++ b/www/analyzer/annotations.html @@ -5,9 +5,12 @@ Source Annotations + + +
@@ -33,30 +36,34 @@ attributes.

recognized by GCC. Their use can be conditioned using preprocessor macros (examples included on this page).

- @@ -382,6 +389,7 @@ the use of preprocessor macros.

void my_assert_rtn(const char *, const char *, int, const char *) CLANG_ANALYZER_NORETURN; +
diff --git a/www/analyzer/available_checks.html b/www/analyzer/available_checks.html index 5e74fd8ea239..7af086506506 100644 --- a/www/analyzer/available_checks.html +++ b/www/analyzer/available_checks.html @@ -5,9 +5,11 @@ Available Checks + +
@@ -28,6 +30,7 @@ of some of the bugs that it finds:

+
diff --git a/www/analyzer/content.css b/www/analyzer/content.css index 3f47e3bea7ad..823fae265c95 100644 --- a/www/analyzer/content.css +++ b/www/analyzer/content.css @@ -2,8 +2,11 @@ html { margin: 0px; } body { margin: 8px; } html, body { padding:0px; + margin:0px; font-size:small; font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, Helvetica, sans-serif; background-color: #fff; color: #222; line-height:1.5; + background-color: #808080; + } h1, h2, h3, tt { color: #000 } @@ -27,7 +30,34 @@ IMG.img_slide { margin-right: auto } +#page { width:930px; text-align: left; margin: 0 auto; padding:0; + background-color: white; height:100%; + border-left: 1px solid #EBF0FA; +} + +#content { + clear: left; + padding: 1em 2em 0 2em; + background-color: #ffffff; +} + .itemTitle { color:#2d58b7 } + /* Tables */ tr { vertical-align:top } + +/* Collapsing Trees: http://dbtree.megalingo.com/web/demo/simple-collapsible-tree.cfm */ +#collapsetree, #collapsetree a:link, #collapsetree li a:link, #collapsetree a:visited, #collapsetree li a:visited{color:#000;text-decoration:none} +#collapsetree,#collapsetree ul{list-style-type:none; width:auto; margin:0; padding:0} +#collapsetree ul{padding-left:20px;display:none;overflow:auto} +#collapsetree li ul{margin:0 auto} +#collapsetree li{display:block;width:100%;line-height:20px;white-space:nowrap} +#collapsetree li a{display:block;padding-left:20px;color:#000;text-decoration:none;background:url(images/tree/bullet.gif) center left no-repeat;white-space:nowrap} +#collapsetree li a:hover{text-decoration:underline;background-color:transparent;color:#000} +#collapsetree li ul.click{display:block} +#collapsetree li.click a{background:url(images/tree/bullet.gif) center left no-repeat} +#collapsetree ul li.click a{background:url(images/tree/bullet.gif) center left no-repeat} +#collapsetree li a.subMenu,#collapsetree ul li a.subMenu{background:url(images/tree/plus.gif) center left no-repeat} +#collapsetree li a.click{background:url(images/tree/minus.gif) center left no-repeat} +#collapsetree ul li a.click{background:url(images/tree/minus.gif) center left no-repeat} \ No newline at end of file diff --git a/www/analyzer/dev_cxx.html b/www/analyzer/dev_cxx.html new file mode 100644 index 000000000000..b5ef2b10919f --- /dev/null +++ b/www/analyzer/dev_cxx.html @@ -0,0 +1,52 @@ + + + + Analyzer Development: C++ Support + + + + + + +
+ +
+ +

C++ Support

+ +

The Clang frontend +now supports the +majority of C++. Support in the frontend for C++ language +features, however, does not automatically translate into support for +those features in the static analyzer. Language features need to be +specifically modeled in the static analyzer so their semantics can be +properly analyzed. Support for analyzing C++ and Objective-C++ files +is currently extremely limited, and we are only encouraging those who +are interested in contributing to the development of the analyzer to +try this functionality out at this time.

+ +

Listed here are a set of open tasks that are prerequisites for +decent analysis of C++. This list is also not complete; new tasks +will be added as deemed necessary.

+ +
    +
  • Control-Flow Graph Enhancements:
  • +
      +
    • Model C++ destructors
    • +
    • Model C++ initializers (in constructors)
    • +
    +
  • Path-Sensitive Analysis Engine (GRExprEngine):
  • +
      +
    • Model C++ casts
    • +
    • Model C++ constructors
    • +
    • Model C++ destructors
    • +
    • Model new and delete
    • +
    +
+ +
+
+ + + diff --git a/www/analyzer/filing_bugs.html b/www/analyzer/filing_bugs.html index 1ce02bee9286..746f1cb22eda 100644 --- a/www/analyzer/filing_bugs.html +++ b/www/analyzer/filing_bugs.html @@ -5,11 +5,12 @@ Filing Bugs and Feature Requests + +
-

Filing Bugs and Feature Requests

@@ -47,15 +48,14 @@ component.

reports to Apple's Bug Reporter web site.

-

You are free to always file bugs through this website, but this option less +

You are free to always file bugs through this website, but this option is less attractive than filing bug reports through Bugzilla as not everyone who works on the analyzer has access to that bug database.

Apple-internal Users

Please file bugs in Radar against the llvm - checker component.

- - +
diff --git a/www/analyzer/images/analyzer_html.png b/www/analyzer/images/analyzer_html.png new file mode 100644 index 000000000000..607ea1882e71 Binary files /dev/null and b/www/analyzer/images/analyzer_html.png differ diff --git a/www/analyzer/images/analyzer_xcode.png b/www/analyzer/images/analyzer_xcode.png new file mode 100644 index 000000000000..84c69809e8c3 Binary files /dev/null and b/www/analyzer/images/analyzer_xcode.png differ diff --git a/www/analyzer/images/tree/bullet.gif b/www/analyzer/images/tree/bullet.gif new file mode 100644 index 000000000000..de1534854699 Binary files /dev/null and b/www/analyzer/images/tree/bullet.gif differ diff --git a/www/analyzer/images/tree/minus.gif b/www/analyzer/images/tree/minus.gif new file mode 100644 index 000000000000..225f40daeb0d Binary files /dev/null and b/www/analyzer/images/tree/minus.gif differ diff --git a/www/analyzer/images/tree/plus.gif b/www/analyzer/images/tree/plus.gif new file mode 100644 index 000000000000..5398c801331c Binary files /dev/null and b/www/analyzer/images/tree/plus.gif differ diff --git a/www/analyzer/index.html b/www/analyzer/index.html index 2cb318625b4e..006bc5c26522 100644 --- a/www/analyzer/index.html +++ b/www/analyzer/index.html @@ -3,19 +3,26 @@ Clang Static Analyzer - + + +
-
-

Clang Static Analyzer

+ + +
+ +

Clang Static Analyzer

The Clang Static Analyzer consists of both a source code analysis framework -and a standalone tool that finds bugs in C and Objective-C programs. The +and a standalone tool that finds bugs in C and Objective-C programs.

+ +

The standalone tool is invoked from the command-line, and is intended to run in tandem with a build of a project or code base.

@@ -75,7 +82,7 @@ href="http://clang.llvm.org">Clang project.

#wrappedcontent { padding:15px;} -
+
@@ -107,6 +114,13 @@ href="http://clang.llvm.org">Clang project.

+
+ +
Viewing static analyzer results in Xcode 3.2
+ +
Viewing static analyzer results in a web browser
+
+

What is Static Analysis?

The term "static analysis" is conflated, but here we use it to mean @@ -181,6 +195,7 @@ you would like the Clang Static Analyzer to find, please feel free to file feature requests or contribute your own patches.

+
diff --git a/www/analyzer/installation.html b/www/analyzer/installation.html index d2be711a4860..b84f26397237 100644 --- a/www/analyzer/installation.html +++ b/www/analyzer/installation.html @@ -5,11 +5,12 @@ Obtaining the Static Analyzer + +
-

Obtaining the Static Analyzer

@@ -106,7 +107,7 @@ are located in $(SRCDIR)/tools/clang/tools/scan-build and are subject to change.

- +
diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl index cccedb5a88c0..87ef5fd45ed0 100644 --- a/www/analyzer/latest_checker.html.incl +++ b/www/analyzer/latest_checker.html.incl @@ -1 +1 @@ -checker-232.tar.bz2 (built December 14, 2009) +checker-234.tar.bz2 (built February 9, 2010) diff --git a/www/analyzer/menu.css b/www/analyzer/menu.css index 0312f4c8b1f1..05c1bbfc82db 100644 --- a/www/analyzer/menu.css +++ b/www/analyzer/menu.css @@ -1,40 +1,52 @@ -/***************/ -/* page layout */ -/***************/ +/* From 'A list apart', 'dropdowns' */ -[id=menu] { - position:fixed; - width:35ex; +#nav { + clear: left; + margin:0; + padding:0; + font-weight: bold; + width:100%; + background-color: #EBF0FA; + border-bottom: 1px solid; + font-size: 80%; } -[id=content] { - /* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */ - position:absolute; - left:39ex; - padding-right:4ex; +#nav a { + text-decoration: none; +} +#nav a:hover { + text-decoration: underline; } - -/**************/ -/* menu style */ -/**************/ - -#menu .submenu { - padding-top:1em; - display:block; +.menubar ul { + list-style: none inside; } - -#menu label { - display:block; - font-weight: bold; - text-align: center; - color: #ffffff; - background-color: #2d58b7; +.menubar li { + margin: 0; + padding: 5px; + text-align: left; + text-indent: 0px; + list-style-position: inside; + list-style:none; + float: left; + position: relative; + width: 13em; + cursor: default; + background-color: #EBF0FA; } -#menu a { - padding:0 .2em; - display:block; - text-align: center; - background-color: #EBF0FA; +.menubar li ul /* second level lists */ { + display: none; + position: absolute; + left: 0; } -#menu a:visited { - color:rgb(100,50,100); -} \ No newline at end of file +.menubar li>ul { + border-left: 1px solid; + border-right: 1px solid; + border-bottom: 1px solid; + padding: 0; + margin: 5px 0; + left:auto; + font-weight: normal; +} +.menubar li:hover ul, li.over ul { /* lists nested under hovered list items */ + display: block; +} + diff --git a/www/analyzer/menu.html.incl b/www/analyzer/menu.html.incl index b7c95f10fb81..8d465e44c2bd 100644 --- a/www/analyzer/menu.html.incl +++ b/www/analyzer/menu.html.incl @@ -1,35 +1,39 @@ - + + + diff --git a/www/analyzer/menu.js b/www/analyzer/menu.js new file mode 100644 index 000000000000..6b393c081c85 --- /dev/null +++ b/www/analyzer/menu.js @@ -0,0 +1,17 @@ +startList = function() { + if (document.all&&document.getElementById) { + navRoot = document.getElementById("nav"); + for (i=0; i Running the Analyzer - - + + +
-
+ +

Running the Analyzer

While the static analyzer engine can be used as a library, many users will @@ -116,7 +117,7 @@ options prefix the build command. For example:

Here is a subset of useful options:

- +
OptionDescription
-oTarget directory for HTML report files. Subdirectories @@ -244,6 +245,7 @@ the arguments over to gcc, but this may not work perfectly (please report bugs of this kind). --> + diff --git a/www/analyzer/scripts/dbtree.js b/www/analyzer/scripts/dbtree.js new file mode 100644 index 000000000000..5face5db96de --- /dev/null +++ b/www/analyzer/scripts/dbtree.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 5,r,Q,u;7 17=[];5=H;1i();9(!1Z.1j.20){1Z.1j.20=k(a){C[C.D]=a}}7 19=\'35+/\';k 36(a){7 b,R=\'\',i=0;I(;i>16,(b&3a)>>8,b&1a)}9(a.21(i-2)==22)1m=R.23(0,R.D-2);s 9(a.21(i-1)==22)1m=R.23(0,R.D-1);s 1m=R;z 3b(1m)}7 A={24:k(){7 a=l.E(\'X\');I(7 i=0;iGCC supports languages that clang does not aim to, such as Java, Ada, FORTRAN, etc.
  • GCC front-ends are very mature and already support C++. - clang's support for C++ is nowhere near - what GCC supports.
  • + clang's support for C++ is further behind.
  • GCC supports more targets than LLVM.
  • GCC is popular and widely adopted.
  • GCC does not require a C++ compiler to build it.
  • diff --git a/www/cxx_status.html b/www/cxx_status.html index fdddc2274a2b..0da84c2048b5 100644 --- a/www/cxx_status.html +++ b/www/cxx_status.html @@ -24,11 +24,89 @@

    C++ Support in Clang

    -

    Last updated: $Date: 2009-12-19 21:59:13 +0100 (Sat, 19 Dec 2009) $

    +

    Last updated: $Date: 2010-02-09 17:50:54 +0100 (Tue, 09 Feb 2010) $

    -

    -This page tracks the status of C++ support in Clang.
    -Clang implements the majority of C++ features, although there are many bugs remaining and Clang is not yet generally useful as a C++ compiler. If you are looking to get involved with Clang development to help work on support for C++, please also look at our Open Projects page and the LLVM bug tracker for some specific ideas.

    +

    Clang C++ Status

    + + + +

    Clang currently implements nearly all of the ISO C++ 1998 standard +(including the defects addressed in the ISO C++ 2003 standard), with +the few notable exceptions listed below. However, the implementation +of Clang C++ is still quite immature, with many remaining bugs that +are likely to cause compiler crashes, erroneous errors and warnings, +and miscompiled code. The LLVM bug +tracker contains a Clang C++ component that tracks known Clang C++ +bugs.

    + +

    Clang is currently missing implementations of the following C++98/03 features and common extensions:

    +
      + +
    • Access control: Clang does not perform access-control checking + at this time, so it will fail to diagnose invalid accesses. Work + is underway to implement this feature.
    • + +
    • Friends and friend templates: Clang parses friends and friend + templates for the most part, but they are not used in access + control and there are a number of problems with friend templates + and friends within class templates.
    • + +
    • GNU strong using extension.
    • + +
    • Qualified member accesses that disambiguate the base class in a diamond-shaped inheritance hierarchy.
    • + +
    + +

    Projects Building with Clang

    + +

    Clang is now capable of compiling some language C++ projects, or +large pieces of such projects. The following table describes various +projects that we have attempted to compile with Clang along with the results of that attempt.

    + +

    At this point in time, each new C++ project typically uncovers +new bugs. We keep track of these in the LLVM bug tracker via tracking bugs, +which are used to relate all of the bugs known to affect that +particular project. Introducing a new project in this list typically requires a liason familiar with LLVM or Clang development, who is able to provide detailed bug reports and track progress for the particular project.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ProjectStatusLast TestedTracking Bug
    Clang and LLVMSuccessful self-hosting achievedContinually
    CMakeCompiles, passes regression tests (debug build)February 9, 2010
    QtPartially compiles; miscompilation of uic prevents complete compilation, qmake works, some small examples also.February 9, 2010PR5881
    BoostSome libraries (e.g., Boost.MPL) successfully build and pass regression tests, the majority still fail.February 5, 2010PR6023
    + +

    Implementation Status by Section

    -

    Clang is still under heavy development. Clang is considered to be - a production quality C and Objective-C compiler when targetting X86-32 and X86-64 - (other targets may have caveats, but are usually easy to fix). If you are - looking for source - analysis or source-to-source transformation tools, clang is probably - a great solution for you. If you are interested in C++, - full support is still way off.

    +

    Clang is still under heavy development. Clang is considered to + be a production quality C and Objective-C compiler when targetting + X86-32 and X86-64 (other targets may have caveats, but are usually + easy to fix). If you are looking for source analysis or + source-to-source transformation tools, clang is probably a great + solution for you. Clang's C++ support is currently alpha quality + at best, but is evolving rapidly: see the C++ status page for more + information.

    Get it and get involved!

    -- cgit v1.3