From 665a8dc95379a936a26e58620c16a175d0226053 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 15 Jan 2012 15:26:07 +0000 Subject: [PATCH] Fix ALL the markup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148219 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/AddressSanitizer.html | 4 +- docs/AnalyzerRegions.html | 6 +- docs/AutomaticReferenceCounting.html | 46 ++++---- docs/DriverInternals.html | 26 +++-- docs/InternalsManual.html | 29 +++-- docs/LanguageExtensions.html | 8 +- docs/PCHInternals.html | 8 +- docs/PTHInternals.html | 6 +- docs/ReleaseNotes.html | 9 +- docs/UsersManual.html | 15 +-- 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 +- 36 files changed, 412 insertions(+), 387 deletions(-) diff --git a/docs/AddressSanitizer.html b/docs/AddressSanitizer.html index 3b25f26feca6..d72776319c37 100644 --- a/docs/AddressSanitizer.html +++ b/docs/AddressSanitizer.html @@ -45,7 +45,7 @@

Introduction

How to build

Follow the clang build instructions. -

Usage

+

Usage

Simply compile and link your program with -faddress-sanitizer flag.
To get a reasonable performance add -O1 or higher.
To get nicer stack traces in error messages add @@ -93,7 +93,7 @@

__has_feature(address_sanitizer)

__has_feature can be used for this purpose.
-#if defined(__has_feature) && __has_feature(address_sanitizer)
+#if defined(__has_feature) && __has_feature(address_sanitizer)
   code that runs only under AddressSanitizer
 #else
   code that does not run under AddressSanitizer
diff --git a/docs/AnalyzerRegions.html b/docs/AnalyzerRegions.html
index 35708d57c970..f9d333792045 100644
--- a/docs/AnalyzerRegions.html
+++ b/docs/AnalyzerRegions.html
@@ -1,3 +1,5 @@
+
 
 
 Static Analyzer Design Document: Memory Regions
@@ -59,7 +61,7 @@ 

Introduction

concerns not only isolates the core analysis engine from the details of reasoning about program memory but also facilities the option of a client of the path-sensitive engine to easily swap in different StoreManager implementations -that internally reason about program memory in very different ways. +that internally reason about program memory in very different ways.

The rest of this document is divided into two parts. We first discuss region taxonomy and the semantics of regions. We then discuss the StoreManager @@ -102,7 +104,7 @@

Pointers

void *p; int *q = (int*) p; char *r = (char*) p; -

Thus we need to canonicalize the MemRegion which is used in binding and retrieving.

diff --git a/docs/AutomaticReferenceCounting.html b/docs/AutomaticReferenceCounting.html index 27d017c3171f..74506b04b15b 100644 --- a/docs/AutomaticReferenceCounting.html +++ b/docs/AutomaticReferenceCounting.html @@ -1,8 +1,10 @@ + Objective-C Automatic Reference Counting (ARC) - - + + - @@ -106,7 +106,7 @@

Attribute 'nonnull'

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

- +example attribute nonnull

Mac OS X API Annotations

@@ -192,7 +192,7 @@

Attribute 'ns_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 @@

Attribute 'cf_returns_retained'
  • 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 @@

    Attribute 'cf_returns_retained'

    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 6cfdaae4bd2e..3f40d323f036 100644 --- a/www/analyzer/available_checks.html +++ b/www/analyzer/available_checks.html @@ -3,9 +3,12 @@ Available Checks - - + + + @@ -24,103 +27,103 @@

    The list of the checks the analyzer performs by default

    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 4519ac8d93fb..cd628a151166 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 @@

    Idea for a Checker

    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 @@

    Checker Registration

    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 b5ef2b10919f..39dbf7b4af8f 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 @@

    C++ Support

    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 460ef815c39c..f32a8ab20a6c 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 7d99ac9621e4..18bafd056288 100644 --- a/www/analyzer/index.html +++ b/www/analyzer/index.html @@ -3,38 +3,10 @@ Clang Static Analyzer - - + + - - - -
    - -
    - - - - +reports. - - - @@ -222,7 +221,7 @@

    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 179e499651a4..0fee7bcb6d12 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 4b72a8527179..2898ce8407f6 100644 --- a/www/comparison.html +++ b/www/comparison.html @@ -3,10 +3,10 @@ - + Comparing clang to other open source compilers - - + + @@ -183,6 +183,7 @@

    Clang vs PCC (Portable C Compiler)

    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 ca43e1951d52..725c52ff4bbc 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 @@

    Language Compatibility

  • 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 @@

    Language Compatibility

    -

    C compatibility

    +

    C compatibility

    @@ -318,7 +318,7 @@

    Inline assembly

    this makes your code more clear and is compatible with both GCC and Clang.

    -

    Objective-C compatibility

    +

    Objective-C compatibility

    @@ -409,7 +409,7 @@

    C variables in @interface or @protocol

    -

    C++ compatibility

    +

    C++ compatibility

    @@ -761,7 +761,7 @@

    Parameter name lookup

    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 @@

    Deleted special member functions

    available here.

    -

    Objective-C++ compatibility

    +

    Objective-C++ compatibility

    @@ -860,7 +860,7 @@

    Using class as a property name

    @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 6aa0bbf4bed5..5351a02aabe8 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 b3b168b88836..45f69074bcfd 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 @@

    Column Numbers and Caret Diagnostics

    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 @@

    Column Numbers and Caret Diagnostics

    $ 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 @@

    Range Highlighting for Related Text

    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 @@

    Range Highlighting for Related Text

    $ 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 @@

    Precision in Wording

    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 @@

    Precision in Wording

    $ 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 @@

    No Pretty Printing of Expressions in Diagnostics

    $ 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 @@

    No Pretty Printing of Expressions in Diagnostics

    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 @@

    Typedef Preservation and Selective Unwrapping

    $ 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 @@

    Typedef Preservation and Selective Unwrapping

    $ 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 @@

    Typedef Preservation and Selective Unwrapping

    $ 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 @@

    Typedef Preservation and Selective Unwrapping

    $ 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 @@

    Fix-it Hints

    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 @@

    Fix-it Hints

       $ 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 @@

    Automatic Macro Expansion

    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 @@

    Automatic Macro Expansion

       $ 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 @@

    Quality of Implementation and Attention to Detail

    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 @@ 

    Quality of Implementation and Attention to Detail

    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 @@

    Quality of Implementation and Attention to Detail

    $ 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 @@

    Quality of Implementation and Attention to Detail

    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 9e342ea0eca5..d55391a34fb4 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 @@

    Fast compiles and Low Memory Use

    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 @@

    Fast compiles and Low Memory Use

    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 @@

    Fast compiles and Low Memory Use

    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 @@

    Expressive Diagnostics

    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 @@

    Library Based Architecture

    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 @@

    Support Diverse Clients

    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 a82388be798c..9ed2d470c1bd 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 @@

    Follow what's going on

    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 8d91a1fa20e8..ca9911297164 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 @@

    On Unix-like Systems

    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 @@

      On Unix-like Systems

    • 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 @@

      On Unix-like Systems

      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 @@

      On Unix-like Systems

    • 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 @@

    Using Visual Studio

    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 @@

        Using 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 @@

      Using 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 @@

      GCC options:

       $ 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 eef9d82816ad..759b16c6baaa 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -3,10 +3,13 @@ - + Hacking on clang - - + + + @@ -22,18 +25,19 @@

      Hacking on Clang

    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 @@

      Testing on Unix-like Systems

      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 @@

      Testing on Unix-like Systems

      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 @@

      Testing on the Command Line

      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 @@

      Testing on the Command Line

      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 @@

      Creating Patch Files

      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 5246ac30b857..b2876670d3b1 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 @@

      Clang - Performance

      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 @@

        Clang - Performance

        dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      Experiments

      @@ -46,7 +45,7 @@

      Experiments

      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 @@

        Experiments

      • -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 @@

      Timing Results

      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 @@

      2008-10-31

      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 f76fc7a0094d..3e8c41110536 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 @@

      Clang - Performance

      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 @@

        Clang - Performance

        dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      For previous performance numbers, please @@ -57,7 +56,7 @@

      Experiments

      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 @@

        Experiments

      • + 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 @@

      2009-03-02

      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 2bb8fe272f2d..e85f19185544 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 @@

      Clang - Performance

      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 @@

        Clang - Performance

        dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

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

      Experiments

      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 @@

        Experiments

      • + 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 @@

      2009-06-26

      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 9fcd390d2399..a1ff79b67de2 100644 --- a/www/related.html +++ b/www/related.html @@ -3,10 +3,10 @@ - + Clang Related Projects - - + +
    - -

    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 @@

    Mac OS X

  • 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 @@

    Other Platforms

    - -
    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 @@

    Slower than Compilation

    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 b0e56f82c420..ebccd071cdce 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 311c5aecd5c8..61546d70bd83 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 e257407d8658..710fa0f4958f 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 @@

    Will it work with any build system?

    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 @@

    Basic Usage

    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 @@ 

    Other Options

    -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.