From d462b6afcdc2e1c3fc7257dd25dd00d8aca29c5e Mon Sep 17 00:00:00 2001
From: Chris Lattner
In addition to all of the functionality of provided by GCC's pragma, Clang +
In addition to all of the functionality provided by GCC's pragma, Clang also allows you to push and pop the current warning state. This is particularly useful when writing a header file that will be compiled by other people, because you don't know what warning flags they build with.
@@ -601,7 +601,7 @@ by the user via changes to the source code. This can be done in two ways: attributes (e.g., __attribute__((nonnull)))) that can either suppress static analyzer warnings or teach the analyzer about code invariants which enable it to find more bugs. While many of these attributes are standard GCC -attributes, additional ones have added to Clang to specifically support the +attributes, additional ones have been added to Clang to specifically support the static analyzer. Detailed information on these annotations can be found in the analyzer's documentation. @@ -620,7 +620,7 @@ selectively exclude code the analyzer examines. Here is an example: In general, this usage is discouraged. Instead, we prefer that users file bugs against the analyzer when it flags false positives. There is also active discussion of allowing users in the future to selectively silence specific -analyzer warnings (some which can already be done using annotations). @@ -639,7 +639,7 @@ Precompiled header files, which represent one of many ways to implement this optimization, are literally files that represent an on-disk cache that contains the vital information necessary to reduce some of the work needed to process a corresponding header file. While details of precompiled -headers vary between compilers, precompiled headers have been shown to be a +headers vary between compilers, precompiled headers have been shown to be highly effective at speeding up program compilation on systems with very large system headers (e.g., Mac OS/X). @@ -739,11 +739,11 @@ likely to affect PCH files that reference a large number of headers. on runtime code generation to check for undefined behavior.-