From 665a8dc95379a936a26e58620c16a175d0226053 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 15 Jan 2012 15:26:07 +0000 Subject: Fix ALL the markup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148219 91177308-0d34-0410-b5e6-96231b3b80d8 --- www/OpenProjects.html | 6 +- www/UniversalDriver.html | 6 +- www/analyzer/annotations.html | 16 ++-- www/analyzer/available_checks.html | 73 +++++++++-------- www/analyzer/checker_dev_manual.html | 17 ++-- www/analyzer/dev_cxx.html | 10 ++- www/analyzer/filing_bugs.html | 4 +- www/analyzer/index.html | 75 +++++++++-------- www/analyzer/installation.html | 4 +- www/analyzer/release_notes.html | 4 +- www/analyzer/scan-build.html | 27 +++---- www/analyzer/xcode.html | 11 ++- www/clang_video-05-25-2007.html | 6 +- www/clang_video-07-25-2007.html | 6 +- www/comparison.html | 7 +- www/compatibility.html | 24 +++--- www/cxx_compatibility.html | 6 +- www/diagnostics.html | 152 ++++++++++++++++++----------------- www/features.html | 25 +++--- www/get_involved.html | 8 +- www/get_started.html | 55 +++++++------ www/hacking.html | 42 +++++----- www/performance-2008-10-31.html | 20 +++-- www/performance-2009-03-02.html | 16 ++-- www/performance.html | 16 ++-- www/related.html | 6 +- 26 files changed, 329 insertions(+), 313 deletions(-) (limited to 'www') diff --git a/www/OpenProjects.html b/www/OpenProjects.html index fec23dc14a..b2d4dae6c3 100644 --- a/www/OpenProjects.html +++ b/www/OpenProjects.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Get Involved - - + + diff --git a/www/UniversalDriver.html b/www/UniversalDriver.html index 82ccc8ded7..2d41a624e1 100644 --- a/www/UniversalDriver.html +++ b/www/UniversalDriver.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Universal Driver - - + + diff --git a/www/analyzer/annotations.html b/www/analyzer/annotations.html index 2766577140..0104f6d44a 100644 --- a/www/analyzer/annotations.html +++ b/www/analyzer/annotations.html @@ -3,8 +3,8 @@ Source Annotations - - + + @@ -106,7 +106,7 @@ int foo(int *p, int *q) {

Running scan-build over this source produces the following output:

- +example attribute nonnull

Mac OS X API Annotations

@@ -192,7 +192,7 @@ use 'cf_returns_retained'.

Running scan-build on this source file produces the following output:

- +example returns retained

Attribute 'ns_returns_not_retained' (Clang-specific)

@@ -242,7 +242,7 @@ Cocoa object. This distinction is important for two reasons:

  • Because Core Foundation is a C API, the analyzer cannot always tell that a pointer return value refers to a Core Foundation object. In contrast, it is trivial for the analyzer to recognize if a pointer refers to a Cocoa object - (given the Objective-C type system).

    + (given the Objective-C type system).

    Placing on C functions: When placing the attribute @@ -311,16 +311,16 @@ CFDateRef returnsRetainedCFDate() {

    Running scan-build on this example produces the following output:

    - +example returns retained -

    When the above code is compiled using Objective-C garbage collection (i.e., +

    When the above code is compiled using Objective-C garbage collection (i.e., code is compiled with the flag -fobjc-gc or -fobjc-gc-only), scan-build produces both the above error (with slightly different text to indicate the code uses garbage collection) as well as the following warning, which indicates a leak that occurs only when using garbage collection:

    - +example returns retained gc

    Attribute 'cf_returns_not_retained' (Clang-specific)

    diff --git a/www/analyzer/available_checks.html b/www/analyzer/available_checks.html index 6cfdaae4bd..3f40d323f0 100644 --- a/www/analyzer/available_checks.html +++ b/www/analyzer/available_checks.html @@ -3,9 +3,12 @@ Available Checks - - + + + @@ -24,103 +27,103 @@

    Description

    --> -core.AdjustedReturnValueCheck to see if the return value of a function call is different than the caller expects (e.g., from calls through function pointers). +core.AdjustedReturnValueCheck to see if the return value of a function call is different than the caller expects (e.g., from calls through function pointers). -core.AttributeNonNullCheck for null pointers passed as arguments to a function whose arguments are marked with the 'nonnull' attribute. +core.AttributeNonNullCheck for null pointers passed as arguments to a function whose arguments are marked with the 'nonnull' attribute. -core.CallAndMessageCheck for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers). +core.CallAndMessageCheck for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers). -core.DivideZeroCheck for division by zero. +core.DivideZeroCheck for division by zero. -core.NullDereferenceCheck for dereferences of null pointers. +core.NullDereferenceCheck for dereferences of null pointers. -core.StackAddressEscapeCheck that addresses to stack memory do not escape the function. +core.StackAddressEscapeCheck that addresses to stack memory do not escape the function. -core.UndefinedBinaryOperatorResultCheck for undefined results of binary operators. +core.UndefinedBinaryOperatorResultCheck for undefined results of binary operators. -core.VLASizeCheck for declarations of VLA of undefined or zero size. +core.VLASizeCheck for declarations of VLA of undefined or zero size. -core.builtin.BuiltinFunctionsEvaluate compiler builtin functions (e.g., alloca()). +core.builtin.BuiltinFunctionsEvaluate compiler builtin functions (e.g., alloca()). -core.builtin.NoReturnFunctionsEvaluate "panic" functions that are known to not return to the caller. +core.builtin.NoReturnFunctionsEvaluate "panic" functions that are known to not return to the caller. -core.uninitialized.ArraySubscriptCheck for uninitialized values used as array subscripts. +core.uninitialized.ArraySubscriptCheck for uninitialized values used as array subscripts. -core.uninitialized.AssignCheck for assigning uninitialized values. +core.uninitialized.AssignCheck for assigning uninitialized values. -core.uninitialized.BranchCheck for uninitialized values used as branch conditions. +core.uninitialized.BranchCheck for uninitialized values used as branch conditions. -core.uninitialized.CapturedBlockVariableCheck for blocks that capture uninitialized values. +core.uninitialized.CapturedBlockVariableCheck for blocks that capture uninitialized values. -core.uninitialized.UndefReturnCheck for uninitialized values being returned to the caller. +core.uninitialized.UndefReturnCheck for uninitialized values being returned to the caller. -deadcode.DeadStoresCheck for values stored to variables that are never read afterwards. +deadcode.DeadStoresCheck for values stored to variables that are never read afterwards. -deadcode.IdempotentOperationsWarn about idempotent operations. +deadcode.IdempotentOperationsWarn about idempotent operations. -osx.APICheck for proper uses of various Mac OS X APIs. +osx.APICheck for proper uses of various Mac OS X APIs. -osx.AtomicCASEvaluate calls to OSAtomic functions. +osx.AtomicCASEvaluate calls to OSAtomic functions. -osx.SecKeychainAPICheck for proper uses of Secure Keychain APIs. +osx.SecKeychainAPICheck for proper uses of Secure Keychain APIs. -osx.cocoa.AtSyncCheck for null pointers used as mutexes for @synchronized. +osx.cocoa.AtSyncCheck for null pointers used as mutexes for @synchronized. -osx.cocoa.ClassReleaseCheck for sending 'retain', 'release', or 'autorelease' directly to a Class. +osx.cocoa.ClassReleaseCheck for sending 'retain', 'release', or 'autorelease' directly to a Class. -osx.cocoa.IncompatibleMethodTypesWarn about Objective-C method signatures with type incompatibilities. +osx.cocoa.IncompatibleMethodTypesWarn about Objective-C method signatures with type incompatibilities. -osx.cocoa.NSAutoreleasePoolWarn for suboptimal uses of NSAutoreleasePool in Objective-C GC mode. +osx.cocoa.NSAutoreleasePoolWarn for suboptimal uses of NSAutoreleasePool in Objective-C GC mode. -osx.cocoa.NSErrorCheck usage of NSError** parameters. +osx.cocoa.NSErrorCheck usage of NSError** parameters. -osx.cocoa.NilArgCheck for prohibited nil arguments to ObjC method calls. +osx.cocoa.NilArgCheck for prohibited nil arguments to ObjC method calls. -osx.cocoa.RetainCountCheck for leaks and improper reference count management. +osx.cocoa.RetainCountCheck for leaks and improper reference count management. -osx.cocoa.UnusedIvarsWarn about private ivars that are never used. +osx.cocoa.UnusedIvarsWarn about private ivars that are never used. -osx.cocoa.VariadicMethodTypesCheck for passing non-Objective-C types to variadic methods that expect only Objective-C types. +osx.cocoa.VariadicMethodTypesCheck for passing non-Objective-C types to variadic methods that expect only Objective-C types. -osx.coreFoundation.CFErrorCheck usage of CFErrorRef* parameters. +osx.coreFoundation.CFErrorCheck usage of CFErrorRef* parameters. -osx.coreFoundation.CFNumberCheck for proper uses of CFNumberCreate. +osx.coreFoundation.CFNumberCheck for proper uses of CFNumberCreate. -osx.coreFoundation.CFRetainReleaseCheck for null arguments to CFRetain/CFRelease. +osx.coreFoundation.CFRetainReleaseCheck for null arguments to CFRetain/CFRelease. -unix.APICheck calls to various UNIX/Posix functions. +unix.APICheck calls to various UNIX/Posix functions. diff --git a/www/analyzer/checker_dev_manual.html b/www/analyzer/checker_dev_manual.html index 4519ac8d93..cd628a1511 100644 --- a/www/analyzer/checker_dev_manual.html +++ b/www/analyzer/checker_dev_manual.html @@ -3,8 +3,8 @@ Checker Developer Manual - - + + @@ -14,7 +14,7 @@
    -

    This Page Is Under Construction

    +

    This Page Is Under Construction

    Checker Developer Manual

    @@ -196,7 +196,8 @@ values (e.g., the number 1). inter-procedural analysis). Also, it uses a simple range tracking based solver to model symbolic execution.
  • -
  • Consult the Bugzilla database +
  • Consult the Bugzilla database to get some ideas for new checkers and consider starting with improving/fixing bugs in the existing checkers.
  • @@ -211,13 +212,13 @@ using namespace clang; using namespace ento; namespace { -class NewChecker: public Checker< check::PreStmt > { +class NewChecker: public Checker< check::PreStmt<CallExpr> > { public: - void checkPreStmt(const CallExpr *CE, CheckerContext &Ctx) const {} + void checkPreStmt(const CallExpr *CE, CheckerContext &Ctx) const {} } } -void ento::registerNewChecker(CheckerManager &mgr) { - mgr.registerChecker(); +void ento::registerNewChecker(CheckerManager &mgr) { + mgr.registerChecker<NewChecker>(); } diff --git a/www/analyzer/dev_cxx.html b/www/analyzer/dev_cxx.html index b5ef2b1091..39dbf7b4af 100644 --- a/www/analyzer/dev_cxx.html +++ b/www/analyzer/dev_cxx.html @@ -3,8 +3,8 @@ Analyzer Development: C++ Support - - + + @@ -31,18 +31,20 @@ decent analysis of C++. This list is also not complete; new tasks will be added as deemed necessary.

      -
    • Control-Flow Graph Enhancements:
    • +
    • Control-Flow Graph Enhancements:
      • Model C++ destructors
      • Model C++ initializers (in constructors)
      -
    • Path-Sensitive Analysis Engine (GRExprEngine):
    • + +
    • 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 460ef815c3..f32a8ab20a 100644 --- a/www/analyzer/filing_bugs.html +++ b/www/analyzer/filing_bugs.html @@ -3,8 +3,8 @@ Filing Bugs and Feature Requests - - + + diff --git a/www/analyzer/index.html b/www/analyzer/index.html index 7d99ac9621..18bafd0562 100644 --- a/www/analyzer/index.html +++ b/www/analyzer/index.html @@ -3,38 +3,10 @@ Clang Static Analyzer - - + + - - - -
    - -
    - - - - +reports. - - - @@ -222,7 +221,7 @@ regular compilation and clang to perform static analysis.

    Running configure typically generates makefiles that have hardwired paths to the compiler, and by running configure through -scan-build that path is set to ccc-analyzer. +scan-build that path is set to ccc-analyzer.

    - + 2007 LLVM Developer's Meeting - - + + diff --git a/www/clang_video-07-25-2007.html b/www/clang_video-07-25-2007.html index 179e499651..0fee7bcb6d 100644 --- a/www/clang_video-07-25-2007.html +++ b/www/clang_video-07-25-2007.html @@ -2,10 +2,10 @@ - + LLVM 2.0 and Beyond! - - + + diff --git a/www/comparison.html b/www/comparison.html index 4b72a85271..2898ce8407 100644 --- a/www/comparison.html +++ b/www/comparison.html @@ -3,10 +3,10 @@ - + Comparing clang to other open source compilers - - + + @@ -183,6 +183,7 @@ inefficient code and does not support many important targets.
  • Like Elsa, PCC's does not have an integrated preprocessor, making it extremely difficult to use it for source analysis tools.
  • + diff --git a/www/compatibility.html b/www/compatibility.html index ca43e1951d..725c52ff4b 100644 --- a/www/compatibility.html +++ b/www/compatibility.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Language Compatibility - - + + @@ -47,7 +47,7 @@
  • C variables in @class or @protocol
  • -
  • C++ compatibility +
  • C++ compatibility
  • -
  • C++11 compatibility +
  • C++11 compatibility
  • -
  • Objective-C++ compatibility +
  • Objective-C++ compatibility @@ -77,7 +77,7 @@ -

    C compatibility

    +

    C compatibility

    @@ -318,7 +318,7 @@ add $4, (%rax) this makes your code more clear and is compatible with both GCC and Clang.

    -

    Objective-C compatibility

    +

    Objective-C compatibility

    @@ -409,7 +409,7 @@ extern int c; // allowed -

    C++ compatibility

    +

    C++ compatibility

    @@ -761,7 +761,7 @@ void f(int a, int a);

    Clang diagnoses this error (where the parameter name has been redeclared). To fix this problem, rename one of the parameters.

    -

    C++11 compatibility

    +

    C++11 compatibility

    @@ -794,7 +794,7 @@ up to version 1.47.0. The fix for Boost's shared_ptr is available here.

    -

    Objective-C++ compatibility

    +

    Objective-C++ compatibility

    @@ -860,7 +860,7 @@ int cls; @implementation I - (int) Meth { return I.class; } @end -
    +

    Use explicit message-send syntax instead, i.e. [I class].

    diff --git a/www/cxx_compatibility.html b/www/cxx_compatibility.html index 6aa0bbf4be..5351a02aab 100644 --- a/www/cxx_compatibility.html +++ b/www/cxx_compatibility.html @@ -3,10 +3,10 @@ - + Clang - C++ Compatibility - - + + diff --git a/www/diagnostics.html b/www/diagnostics.html index b3b168b888..45f69074bc 100644 --- a/www/diagnostics.html +++ b/www/diagnostics.html @@ -4,10 +4,14 @@ Clang - Expressive Diagnostics - - + + + .warn { color:magenta; } + .err { color:red; } + .snip { color:darkgreen; } + .point { color:blue; } + @@ -35,14 +39,14 @@ that embed Clang and extract equivalent information through internal APIs.-->

    First, all diagnostics produced by clang include full column number information. The clang command-line compiler driver uses this information -to print "caret diagnostics". +to print "point diagnostics". (IDEs can use the information to display in-line error markup.) Precise error location in the source is a feature provided by many commercial compilers, but is generally missing from open source compilers. This is nice because it makes it very easy to understand exactly what is wrong in a particular piece of code

    -

    The caret (the blue "^" character) exactly shows where the problem is, even +

    The point (the blue "^" character) exactly shows where the problem is, even inside of a string. This makes it really easy to jump to the problem and helps when multiple instances of the same character occur on a line. (We'll revisit this more in following examples.)

    @@ -51,9 +55,9 @@ revisit this more in following examples.)

    $ gcc-4.2 -fsyntax-only -Wformat format-strings.c format-strings.c:91: warning: too few arguments for format $ clang -fsyntax-only format-strings.c - format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument - printf("%.*d"); - ^ + format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument + printf("%.*d"); + ^

    Range Highlighting for Related Text

    @@ -63,7 +67,7 @@ statements, and other constructs in your program and uses this to make diagnostics highlight related information. In the following somewhat nonsensical example you can see that you don't even need to see the original source code to understand what is wrong based on the Clang error. Because clang prints a -caret, you know exactly which plus it is complaining about. The range +point, you know exactly which plus it is complaining about. The range information highlights the left and right side of the plus which makes it immediately obvious what the compiler is talking about. Range information is very useful for @@ -73,9 +77,9 @@ cases involving precedence issues and many other cases.

    $ gcc-4.2 -fsyntax-only t.c t.c:7: error: invalid operands to binary + (have 'int' and 'struct A') $ clang -fsyntax-only t.c - t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') - return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); - ~~~~~~~~~~~~~~ ^ ~~~~~ + t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') + return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); + ~~~~~~~~~~~~~~ ^ ~~~~~

    Precision in Wording

    @@ -84,7 +88,7 @@ cases involving precedence issues and many other cases.

    out of clang contain exactly the pertinent information about what is wrong and why. In the example above, we tell you what the inferred types are for the left and right hand sides, and we don't repeat what is obvious from the -caret (e.g., that this is a "binary +").

    +point (e.g., that this is a "binary +").

    Many other examples abound. In the following example, not only do we tell you that there is a problem with the * and point to it, we say exactly why and tell you what the type is (in case it is @@ -96,9 +100,9 @@ quickly.

    $ gcc-4.2 -fsyntax-only t.c t.c:5: error: invalid type argument of 'unary *' $ clang -fsyntax-only t.c - t.c:5:11: error: indirection requires pointer operand ('int' invalid) - int y = *SomeA.X; - ^~~~~~~~ + t.c:5:11: error: indirection requires pointer operand ('int' invalid) + int y = *SomeA.X; + ^~~~~~~~

    No Pretty Printing of Expressions in Diagnostics

    @@ -111,9 +115,9 @@ it tries to do this. In this example P and Q have type "int*":

    $ gcc-4.2 -fsyntax-only t.c #'exact_div_expr' not supported by pp_c_expression#'t.c:12: error: called object is not a function $ clang -fsyntax-only t.c - t.c:12:8: error: called object type 'int' is not a function or function pointer - (P-Q)(); - ~~~~~^ + t.c:12:8: error: called object type 'int' is not a function or function pointer + (P-Q)(); + ~~~~~^

    This can be particularly bad in G++, which often emits errors @@ -136,9 +140,9 @@ it tries to do this. In this example P and Q have type "int*":

    t.cc:9: error: no match for 'operator+' in '(((a*)P) + (*(long int*)(P->foo::<anonymous>.a::_vptr$a + -0x00000000000000020)))->a::bar() + * P' t.cc:9: error: return-statement with a value, in function returning 'void' $ clang t.cc - t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo') - return P->bar() + *P; - ~~~~~~~~ ^ ~~ + t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo') + return P->bar() + *P; + ~~~~~~~~ ^ ~~ @@ -160,9 +164,9 @@ message would be ugly just because it was long and hard to read.

    $ gcc-4.2 -fsyntax-only t.c t.c:15: error: invalid operands to binary / (have 'float __vector__' and 'const int *') $ clang -fsyntax-only t.c - t.c:15:11: error: can't convert between vector values of different size ('__m128' and 'int const *') - myvec[1]/P; - ~~~~~~~~^~ + t.c:15:11: error: can't convert between vector values of different size ('__m128' and 'int const *') + myvec[1]/P; + ~~~~~~~~^~

    The following example shows where it is useful for the compiler to expose @@ -173,9 +177,9 @@ system "pid_t" typedef is defined, Clang helpfully displays it with "aka".

    $ gcc-4.2 -fsyntax-only t.c t.c:13: error: request for member 'x' in something not a structure or union $ clang -fsyntax-only t.c - t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a structure or union - myvar = myvar.x; - ~~~~~ ^ + t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a structure or union + myvar = myvar.x; + ~~~~~ ^

    In C++, type preservation includes retaining any qualification written into type names. For example, if we take a small snippet of code such as: @@ -204,9 +208,9 @@ void addHTTPService(servers::Server const &server, ::services::WebService co $ g++-4.2 -fsyntax-only t.cpp t.cpp:9: error: no match for 'operator+=' in 'server += http' $ clang -fsyntax-only t.cpp - t.cpp:9:10: error: invalid operands to binary expression ('servers::Server const' and '::services::WebService const *') - server += http; - ~~~~~~ ^ ~~~~ + t.cpp:9:10: error: invalid operands to binary expression ('servers::Server const' and '::services::WebService const *') + server += http; + ~~~~~~ ^ ~~~~

    Naturally, type preservation extends to uses of templates, and Clang retains information about how a particular template specialization (like std::vector<Real>) was spelled within the source code. For example:

    @@ -215,9 +219,9 @@ void addHTTPService(servers::Server const &server, ::services::WebService co $ g++-4.2 -fsyntax-only t.cpp t.cpp:12: error: no match for 'operator=' in 'str = vec' $ clang -fsyntax-only t.cpp - t.cpp:12:7: error: incompatible type assigning 'vector<Real>', expected 'std::string' (aka 'class std::basic_string<char>') - str = vec; - ^ ~~~ + t.cpp:12:7: error: incompatible type assigning 'vector<Real>', expected 'std::string' (aka 'class std::basic_string<char>') + str = vec; + ^ ~~~

    Fix-it Hints

    @@ -230,18 +234,18 @@ specific guidance in the form of a code transformation to correct the problem. In the following example, Clang warns about the use of a GCC extension that has been considered obsolete since 1993. The underlined code should be removed, then replaced with the code below the -caret line (".x =" or ".y =", respectively).

    +point line (".x =" or ".y =", respectively).

       $ clang t.c
    -  t.c:5:28: warning: use of GNU old-style field designator extension
    -  struct point origin = { x: 0.0, y: 0.0 };
    -                          ~~ ^
    -                          .x = 
    -  t.c:5:36: warning: use of GNU old-style field designator extension
    -  struct point origin = { x: 0.0, y: 0.0 };
    -                                  ~~ ^
    -                                  .y = 
    +  t.c:5:28: warning: use of GNU old-style field designator extension
    +  struct point origin = { x: 0.0, y: 0.0 };
    +                          ~~ ^
    +                          .x = 
    +  t.c:5:36: warning: use of GNU old-style field designator extension
    +  struct point origin = { x: 0.0, y: 0.0 };
    +                                  ~~ ^
    +                                  .y = 
     

    "Fix-it" hints are most useful for @@ -253,10 +257,10 @@ diagnostic.

       $ clang t.cpp
    -  t.cpp:9:3: error: template specialization requires 'template<>'
    +  t.cpp:9:3: error: template specialization requires 'template<>'
         struct iterator_traits<file_iterator> {
    -    ^
    -    template<> 
    +    ^
    +    template<> 
     

    Automatic Macro Expansion

    @@ -273,12 +277,12 @@ and also shows how some of the other pieces work in a bigger example.

    t.c: In function 'test': t.c:80: error: invalid operands to binary < (have 'struct mystruct' and 'float') $ clang -fsyntax-only t.c - t.c:80:3: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) - X = MYMAX(P, F); - ^~~~~~~~~~~ + t.c:80:3: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) + X = MYMAX(P, F); + ^~~~~~~~~~~ t.c:76:94: note: instantiated from: - #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) - ~~~ ^ ~~~ + #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) + ~~~ ^ ~~~

    Here's another real world warning that occurs in the "window" Unix package (which @@ -286,15 +290,15 @@ implements the "wwopen" class of APIs):

       $ clang -fsyntax-only t.c
    -  t.c:22:2: warning: type specifier missing, defaults to 'int'
    -          ILPAD();
    -          ^
    +  t.c:22:2: warning: type specifier missing, defaults to 'int'
    +          ILPAD();
    +          ^
       t.c:17:17: note: instantiated from:
    -  #define ILPAD() PAD((NROW - tt.tt_row) * 10)    /* 1 ms per char */
    -                  ^
    +  #define ILPAD() PAD((NROW - tt.tt_row) * 10)    /* 1 ms per char */
    +                  ^
       t.c:14:2: note: instantiated from:
    -          register i; \
    -          ^
    +          register i; \
    +          ^
     

    In practice, we've found that Clang's treatment of macros is actually more useful in multiply nested @@ -308,7 +312,7 @@ little things add up over time and contribute to a great user experience.

    The following example shows a trivial little tweak, where we tell you to put the semicolon at the end of the line that is missing it (line 4) instead of at the beginning of the following line (line 5). This is particularly important with fixit hints -and caret diagnostics, because otherwise you don't get the important context. +and point diagnostics, because otherwise you don't get the important context.

    @@ -316,10 +320,10 @@ and caret diagnostics, because otherwise you don't get the important context.
       t.c: In function 'foo':
       t.c:5: error: expected ';' before '}' token
       $ clang t.c
    -  t.c:4:8: error: expected ';' after expression
    -    bar()
    -         ^
    -         ;
    +  t.c:4:8: error: expected ';' after expression
    +    bar()
    +         ^
    +         ;
     

    The following example shows much better error recovery than GCC. The message coming out @@ -330,9 +334,9 @@ and produces a much more useful diagnosis of the problem.

    $ gcc-4.2 t.c t.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token $ clang t.c - t.c:3:1: error: unknown type name 'foo_t' - foo_t *P = 0; - ^ + t.c:3:1: error: unknown type name 'foo_t' + foo_t *P = 0; + ^

    The following example shows that we recover from the simple case of @@ -352,14 +356,14 @@ forgetting a ; after a struct definition much better than GCC.

    t.cc:4: error: invalid type in declaration before ';' token t.cc:6: error: expected unqualified-id at end of input $ clang t.cc - t.cc:2:11: error: expected ';' after class - class a {} - ^ - ; - t.cc:6:2: error: expected ';' after struct - } - ^ - ; + t.cc:2:11: error: expected ';' after class + class a {} + ^ + ; + t.cc:6:2: error: expected ';' after struct + } + ^ + ;

    While each of these details is minor, we feel that they all add up to provide diff --git a/www/features.html b/www/features.html index 9e342ea0ec..d55391a34f 100644 --- a/www/features.html +++ b/www/features.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Features and Goals - - + + @@ -71,7 +71,8 @@ options for performance analysis.

    is significantly quicker than gcc and uses less memory For example, when compiling "Carbon.h" on Mac OS/X, we see that clang is 2.5x faster than GCC:

    - +Time to parse carbon.h: -fsyntax-only

    Carbon.h is a monster: it transitively includes 558 files, 12.3M of code, declares 10000 functions, has 2000 struct definitions, 8000 fields, 20000 enum @@ -94,7 +95,8 @@ memory use is even moreso: the less memory the code takes the more code you can fit into memory at a time (useful for whole program analysis tools, for example).

    - +Space

    Here we see a huge advantage of clang: its ASTs take 5x less memory than GCC's syntax trees, despite the fact that clang's ASTs capture far more @@ -107,7 +109,8 @@ architecture that makes it relatively easy to adapt it and build new tools with it. This means that it is often possible to apply out-of-the-box thinking and novel techniques to improve compilation in various ways.

    - +Preprocessor Speeds: GCC 4.2 vs clang-all

    This slide shows how the clang preprocessor can be used to make "distcc" parallelization 3x more scalable than when using the GCC preprocessor. @@ -149,8 +152,8 @@ GCC and Clang diagnostic:

    t.c:7: error: invalid operands to binary + (have 'int' and 'struct A') $ clang -fsyntax-only t.c t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') - return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); - ~~~~~~~~~~~~~~ ^ ~~~~~ + return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); + ~~~~~~~~~~~~~~ ^ ~~~~~

    Here you can see that you don't even need to see the original source code to @@ -200,13 +203,13 @@ and uses. In addition, the library-based approach encourages good interfaces and makes it easier for new developers to get involved (because they only need to understand small pieces of the big picture).

    -
    +

    "The world needs better compiler tools, tools which are built as libraries. This design point allows reuse of the tools in new and novel ways. However, building the tools as libraries isn't enough: they must have clean APIs, be as decoupled from each other as possible, and be easy to modify/extend. This requires clean layering, decent design, and keeping the libraries independent of -any specific client."

    +any specific client."

    Currently, clang is divided into the following libraries and tool: @@ -295,7 +298,7 @@ hard, and we don't always get it right the first time, but we fix any problems when we realize we made a mistake.

    -

    Integration with IDEs

    +

    Integration with IDEs

    diff --git a/www/get_involved.html b/www/get_involved.html index a82388be79..9ed2d470c1 100644 --- a/www/get_involved.html +++ b/www/get_involved.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Get Involved - - + + @@ -56,7 +56,7 @@ discussions or follow the list development on the web if you prefer.

    If you're looking for something to work on, check out our Open Projects page or go look through the Bugzilla bug database.

    -

    Contributing Extensions to Clang

    +

    Contributing Extensions to Clang

    Clang has always been designed as a platform for experimentation, allowing programmers to easily extend the compiler to support great diff --git a/www/get_started.html b/www/get_started.html index 8d91a1fa20..ca99112971 100644 --- a/www/get_started.html +++ b/www/get_started.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Getting Started - - + + @@ -45,23 +45,26 @@ follows:

    http://www.python.org/download
  • -
  • Checkout LLVM:
  • +
  • Checkout LLVM:
    • Change directory to where you want the llvm directory placed.
    • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    -
  • Checkout Clang:
  • + +
  • Checkout Clang:
    • cd llvm/tools
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    -
  • Checkout Compiler-RT:
  • + +
  • Checkout Compiler-RT:
    • cd llvm/projects
    • svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
    -
  • Build LLVM and Clang:
  • + +
  • Build LLVM and Clang:
    • cd ../.. (back to where you started)
    • mkdir build (for building without polluting the source dir) @@ -72,15 +75,15 @@ follows:

    • This builds both LLVM and Clang for debug mode.
    • Note: For subsequent Clang development, you can just do make at the clang directory level.
    • +
    • It is also possible to use CMake instead of the makefiles. With CMake + it is also possible to generate project files for several IDEs: Eclipse + CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.
    - -

    It is also possible to use CMake instead of the makefiles. With CMake it - is also possible to generate project files for several IDEs: Eclipse CDT4, - CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.

    +
  • If you intend to work on Clang C++ support, you may need to tell it how to find your C++ standard library headers. If Clang cannot find your - system libstdc++ headers, please follow these instructions:
  • + system libstdc++ headers, please follow these instructions:
    • 'gcc -v -x c++ /dev/null -fsyntax-only' to get the path.
    • @@ -88,7 +91,8 @@ follows:

      hard-coded paths" in clang/lib/Frontend/InitHeaderSearch.cpp and change the lines below to include that path.
    -
  • Try it out (assuming you add llvm/Debug+Asserts/bin to your path):
  • + +
  • Try it out (assuming you add llvm/Debug+Asserts/bin to your path):
    • clang --help
    • clang file.c -fsyntax-only (check for correctness)
    • @@ -96,6 +100,7 @@ follows:

    • clang file.c -S -emit-llvm -o - -O3
    • clang file.c -S -O3 -o - (output native machine code)
    +
  • Note that the C front-end uses LLVM, but does not depend on llvm-gcc. If you @@ -122,7 +127,7 @@ to subversion.

    Visual Studio:

      -
    1. Get the required tools:
    2. +
    3. Get the required tools: +
    4. -
    5. Checkout LLVM:
    6. +
    7. Checkout LLVM:
      • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
      -
    8. Checkout Clang:
    9. + +
    10. Checkout Clang:
      • cd llvm\tools
      • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
      -
    11. Run cmake to generate the Visual Studio solution and project files:
    12. + +
    13. Run cmake to generate the Visual Studio solution and project files:
      • cd ..\.. (back to where you started)
      • mkdir build (for building without polluting the source dir)
      • @@ -168,16 +176,17 @@ Visual Studio:

        definition in CMakeLists.txt.
      • See the LLVM CMake guide for more information on other configuration options for cmake.
      • -
      • The above, if successful, will have created an LLVM.sln file in the build directory.
      -
    14. Build Clang:
    15. + +
    16. Build Clang:
      • Open LLVM.sln in Visual Studio.
      • Build the "clang" project for just the compiler driver and front end, or the "ALL_BUILD" project to build everything, including tools.
      +
    17. Try it out (assuming you added llvm/debug/bin to your path). (See the running examples from above.)
    18. See @@ -189,7 +198,7 @@ Visual Studio:

      to the latest code base, use the svn update command in both the llvm and llvm\tools\clang directories, as they are separate repositories.

      -

      Clang Compiler Driver (Drop-in Substitute for GCC)

      +

      Clang Compiler Driver (Drop-in Substitute for GCC)

      The clang tool is the compiler driver and front-end, which is designed to be a drop-in replacement for the gcc command. Here are @@ -248,9 +257,9 @@ $ clang -fsyntax-only ~/t.c

       $ clang -fsyntax-only ~/t.c -pedantic
      -/Users/sabre/t.c:2:17: warning: extension used
      -typedef float V __attribute__((vector_size(16)));
      -                ^
      +/Users/sabre/t.c:2:17: warning: extension used
      +typedef float V __attribute__((vector_size(16)));
      +                ^
       1 diagnostic generated.
       
      diff --git a/www/hacking.html b/www/hacking.html index eef9d82816..759b16c6ba 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -3,10 +3,13 @@ - + Hacking on clang - - + + + @@ -22,18 +25,19 @@
    19. Coding Standards
    20. Developer Documentation
    21. Debugging
    22. -
    23. Testing
    24. +
    25. Testing +
    26. Creating Patch Files
    27. LLVM IR Generation
    28. -

      Coding Standards

      +

      Coding Standards

      Clang follows the @@ -139,7 +143,7 @@

      During the run of make test, the terminal output will display a line similar to the following:

      -
        --- Running clang tests for i686-pc-linux-gnu ---
      +
      --- Running clang tests for i686-pc-linux-gnu ---

      followed by a line continually overwritten with the current test file being compiled, and an overall completion percentage.

      @@ -150,12 +154,12 @@ Failing Tests (count): message will be followed by a list of the test source file paths that failed. For example:

      -
      +  
         Failing Tests (3):
             /home/john/llvm/tools/clang/test/SemaCXX/member-name-lookup.cpp
             /home/john/llvm/tools/clang/test/SemaCXX/namespace-alias.cpp
             /home/john/llvm/tools/clang/test/SemaCXX/using-directive.cpp
      -  
      +

      If you used the make VERBOSE=1 option, the terminal output will reflect the error messages from the compiler and @@ -210,10 +214,10 @@

      To run all the tests from the command line, execute a command like the following:

      - +
         python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
        (path to llvm)/llvm/tools/clang/test
      -  
      +

      For CMake builds e.g. on Windows with Visual Studio, you will need to specify your build configuration (Debug, Release, etc.) via @@ -221,31 +225,31 @@

      To run a single test:

      - +
         python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
        (path to llvm)/llvm/tools/clang/test/(dir)/(test)
      -  
      +

      For example:

      - +
         python C:/Tools/llvm/utils/lit/lit.py -sv --no-progress-bar
         C:/Tools/llvm/tools/clang/test/Sema/wchar.c
      -  
      +

      The -sv option above tells the runner to show the test output if any tests failed, to help you determine the cause of failure.

      Your output might look something like this:

      -
      lit.py: lit.cfg:152: note: using clang: 'C:/Tools/llvm/bin/Release\\clang.EXE'
      +  
      lit.py: lit.cfg:152: note: using clang: 'C:/Tools/llvm/bin/Release\\clang.EXE'
       -- Testing: Testing: 2534 tests, 4 threads --
       Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
       Testing Time: 81.52s
         Expected Passes    : 2503
         Expected Failures  : 28
         Unsupported Tests  : 3
      -
      +

      The statistic, "Unexpected Failures" (not shown if all tests pass), is the important one.

      @@ -263,15 +267,15 @@ Testing Time: 81.52s

      To create these patch files, change directory to the llvm/tools/clang root and run:

      -
        svn diff (relative path) >(patch file name)
      +
      svn diff (relative path) >(patch file name)

      For example, for getting the diffs of all of clang:

      -
        svn diff . >~/mypatchfile.patch
      +
      svn diff . >~/mypatchfile.patch

      For example, for getting the diffs of a single file:

      -
        svn diff lib/Parse/ParseDeclCXX.cpp >~/ParseDeclCXX.patch
      +
      svn diff lib/Parse/ParseDeclCXX.cpp >~/ParseDeclCXX.patch

      Note that the paths embedded in the patch depend on where you run it, so changing directory to the llvm/tools/clang directory is recommended.

      diff --git a/www/performance-2008-10-31.html b/www/performance-2008-10-31.html index 5246ac30b8..b2876670d3 100644 --- a/www/performance-2008-10-31.html +++ b/www/performance-2008-10-31.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page tracks the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      Experiments

      @@ -46,7 +45,7 @@ interesting benchmarks:

      Measurements are done by serially processing each file in the respective benchmark, using Clang, gcc, and llvm-gcc as compilers. In order to track the performance of various subsystems the timings have -been broken down into separate stages where possible: +been broken down into separate stages where possible:

      • -Eonly: This option runs the preprocessor but does not @@ -65,7 +64,6 @@ been broken down into separate stages where possible:
      • -S -O0 -g: This adds emission of debug information to the assembly output.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The @@ -94,9 +92,9 @@ compile time here.

      2008-10-31

      -

      Sketch

      +

      Sketch

      Sketch Timings + src="timing-data/2008-10-31/sketch.png" alt="Sketch Timings">

      This shows Clang's substantial performance improvements in preprocessing and semantic analysis; over 90% faster on @@ -112,9 +110,9 @@ with PCH; about 4x in wall time. Unfortunately, Clang does not yet have an implementation of PCH-style optimizations, but we are actively working to address this.

      -

      176.gcc

      +

      176.gcc

      176.gcc Timings + src="timing-data/2008-10-31/176.gcc.png" alt="176.gcc Timings">

      Unlike the Sketch timings, compilation of 176.gcc involves a large amount of code generation. The time spent in Clang's diff --git a/www/performance-2009-03-02.html b/www/performance-2009-03-02.html index f76fc7a009..3e8c411105 100644 --- a/www/performance-2009-03-02.html +++ b/www/performance-2009-03-02.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page shows the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      For previous performance numbers, please @@ -57,7 +56,7 @@ in order to evaluate the overhead of the driver itself.

      have been broken down into separate stages where possible. This is done by over-riding the CC environment variable used during the build to point to one of a few simple shell scripts which may skip part of -the build. +the build.

      • non-compiler: The overhead of the build system itself; @@ -78,7 +77,6 @@ the build.
      • + assembler: Add assembler time to generate .o files.
      • + linker: Add linker time.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The @@ -99,12 +97,12 @@ analysis (and preprocessing/parsing, in the case of gcc).

      Sketch Timings + src="timing-data/2009-03-02/sketch.png" alt="Sketch Timings"> 176.gcc Timings + src="timing-data/2009-03-02/176.gcc.png" alt="176.gcc Timings"> diff --git a/www/performance.html b/www/performance.html index 2bb8fe272f..e85f191855 100644 --- a/www/performance.html +++ b/www/performance.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page shows the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      For previous performance numbers, please @@ -56,7 +55,7 @@ compilers.

      have been broken down into separate stages where possible. This is done by over-riding the CC environment variable used during the build to point to one of a few simple shell scripts which may skip part of -the build. +the build.

      • non-compiler: The overhead of the build system itself; @@ -73,7 +72,6 @@ the build.
      • + assembler: Add assembler time to generate .o files.
      • + linker: Add linker time.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The timings measure the @@ -93,12 +91,12 @@ semantic analysis after PCH generation is done.

      Sketch Timings + src="timing-data/2009-06-26/sketch.png" alt="Sketch Timings"> 176.gcc Timings + src="timing-data/2009-06-26/176.gcc.png" alt="176.gcc Timings"> diff --git a/www/related.html b/www/related.html index 9fcd390d23..a1ff79b67d 100644 --- a/www/related.html +++ b/www/related.html @@ -3,10 +3,10 @@ - + Clang Related Projects - - + + -- cgit v1.2.3-18-g5258
    - -

    Clang Static Analyzer

    - -

    The Clang Static Analyzer is source code analysis tool that find bugs in C -and Objective-C programs.

    - -

    Currently it can be run either as a standalone -tool or within Xcode. The standalone tool is -invoked from the command-line, and is intended to be run in tandem with a build -of a codebase.

    - -

    The analyzer is 100% open source and is part of the Clang project. Like the rest of Clang, the -analyzer is implemented as a C++ library that can be used by other tools and -applications.

    - -

    Download

    - - + - + + + +
    + +
    + + + +
    + +

    Clang Static Analyzer

    + +

    The Clang Static Analyzer is source code analysis tool that find bugs in C +and Objective-C programs.

    + +

    Currently it can be run either as a standalone +tool or within Xcode. The standalone tool is +invoked from the command-line, and is intended to be run in tandem with a build +of a codebase.

    + +

    The analyzer is 100% open source and is part of the Clang project. Like the rest of Clang, the +analyzer is implemented as a C++ library that can be used by other tools and +applications.

    + +

    Download

    @@ -101,7 +98,7 @@ applications.

  • Latest build (Intel-only binary, 10.5+):
  • -
  • Release notes
  • +
  • Release notes
  • This build can be used both from the command line and from within Xcode
  • Installation and usage
  • @@ -140,10 +137,10 @@ applications.

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

    What is Static Analysis?

    @@ -198,7 +195,7 @@ bugs require in the worst case exponential time.

    The Clang Static Analyzer runs in a reasonable amount of time by both bounding the amount of checking work it will do as well as using clever -algorithms to reduce the amount of work it must do to find bugs.

    +algorithms to reduce the amount of work it must do to find bugs.

    False Positives

    diff --git a/www/analyzer/installation.html b/www/analyzer/installation.html index b0e56f82c4..ebccd071cd 100644 --- a/www/analyzer/installation.html +++ b/www/analyzer/installation.html @@ -3,8 +3,8 @@ Obtaining the Static Analyzer - - + + diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html index 311c5aecd5..61546d70bd 100644 --- a/www/analyzer/release_notes.html +++ b/www/analyzer/release_notes.html @@ -3,8 +3,8 @@ Release notes for checker-XXX builds - - + + diff --git a/www/analyzer/scan-build.html b/www/analyzer/scan-build.html index e257407d86..710fa0f495 100644 --- a/www/analyzer/scan-build.html +++ b/www/analyzer/scan-build.html @@ -3,8 +3,8 @@ scan-build: running the analyzer from the command line - - + + @@ -16,7 +16,7 @@

    scan-build: running the analyzer from the command line

    - +
    -

    What is it?

    @@ -45,11 +45,10 @@ the best use of scan-build, which includes getting it to work when the aforementioned hack fails to work.

    -
    -
    - -
    Viewing static analyzer results in a web browser
    +
    + scan-build
    + analyzer in browser +
    Viewing static analyzer results in a web browser

    Contents

    @@ -101,7 +100,7 @@ $ scan-build [scan-build options]

    Operationally, scan-build literally runs <command> with all of the -subsequent options passed to it. For example, one can pass -j4 to +subsequent options passed to it. For example, one can pass -j4 to make get a parallel build over 4 cores:

    @@ -141,17 +140,17 @@ options prefix the build command. For example:

    -oTarget directory for HTML report files. Subdirectories will be created as needed to represent separate "runs" of the analyzer. If this option is not specified, a directory is created in /tmp to store the -reports.
    -h
    (or no arguments)
    Display all +
    -h
    (or no arguments)
    Display all scan-build options.
    -k
    --keep-going
    Add a "keep on +
    -k
    --keep-going
    Add a "keep on going" option to the specified build command.

    This option currently supports make and xcodebuild.

    This is a convenience option; one can specify this behavior directly using build options.

    -vVerbose output from scan-build and the analyzer. A +
    -vVerbose output from scan-build and the analyzer. A second and third "-v" increases verbosity, and is useful for filing bug reports against the analyzer.