summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more ↵Anna Zaks2011-09-302-2/+2
| | | | | | precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity). llvm-svn: 140840
* [analyzer] Add -analyzer-purge option which can take on multiple values, ↵Anna Zaks2011-09-3010-35/+94
| | | | | | remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.) llvm-svn: 140838
* Some fixes for MS-style asm parsing: specifically, add some error checking, ↵Eli Friedman2011-09-304-36/+131
| | | | | | and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.) llvm-svn: 140837
* constexpr functions are implicitly const. More tests to follow.Richard Smith2011-09-306-10/+30
| | | | llvm-svn: 140831
* Fix typo.Richard Smith2011-09-301-1/+1
| | | | llvm-svn: 140829
* Suggest adding 'constexpr' if the GNU extension for in-class initializers ↵Richard Smith2011-09-304-3/+9
| | | | | | for static const float members is used in C++11 mode. llvm-svn: 140828
* Mark the ExtWarn for in-class initialization of static const float members ↵Richard Smith2011-09-297-23/+21
| | | | | | as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. llvm-svn: 140820
* Minor refactoring. Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-292-37/+43
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140818
* PR11040: CheckICE should not allow an lvalue bitcast as part of an integer ↵Eli Friedman2011-09-292-5/+13
| | | | | | constant expression. llvm-svn: 140812
* In C++0x, static const volatile data members cannot be initialized in-class.Richard Smith2011-09-294-4/+36
| | | | llvm-svn: 140809
* PR11000: Fix crash on invalid.Richard Smith2011-09-292-1/+10
| | | | llvm-svn: 140802
* constexpr: semantic checking for constexpr variables.Richard Smith2011-09-2911-56/+248
| | | | | | We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier). llvm-svn: 140801
* c - Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-295-9/+41
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Add more comments to several checker callback functions.Anna Zaks2011-09-291-0/+18
| | | | llvm-svn: 140797
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-2916-58/+153
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* Add a warning group for warnings about using C1X features as extensionsPeter Collingbourne2011-09-293-5/+6
| | | | llvm-svn: 140795
* Add support for parsing an attribute-specifier-seq containing multiplePeter Collingbourne2011-09-293-8/+26
| | | | | | attribute-specifiers llvm-svn: 140794
* Add support for parsing the optional attribute-specifier-seq at thePeter Collingbourne2011-09-292-0/+5
| | | | | | end of a decl-specifier-seq llvm-svn: 140793
* Driver: use correct search paths for multilibPeter Collingbourne2011-09-291-2/+2
| | | | llvm-svn: 140782
* Add an ns_bridged attribute, used to specify that a John McCall2011-09-296-1/+60
| | | | | | | | | | | | | | pointer to the annotated struct type can be used as an Objective-C object pointer. If an argument is given, the type is actually "toll-free bridged" to the specific type named there, rather than just to 'id'. For now, we cannot rely on all types being so annotated, and we'll always have to have exceptions for things like CFTypeRef (aka const void*), but this is clearly a good foundation for improving toolage in this area. llvm-svn: 140779
* Like IBOutletCollection, it only makes sense to apply the IBOutlet ↵Ted Kremenek2011-09-295-35/+44
| | | | | | annotation to Objective-C object types. Fixes <rdar://problem/10142685>. llvm-svn: 140778
* Do not warn about empty format strings when there are no data arguments. ↵Ted Kremenek2011-09-292-8/+12
| | | | | | Fixes <rdar://problem/9473155>. llvm-svn: 140777
* Unnecessary elseDavid Blaikie2011-09-291-2/+1
| | | | llvm-svn: 140775
* Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring ↵Daniel Dunbar2011-09-294-27/+12
| | | | | | is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state. llvm-svn: 140771
* Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to ↵Daniel Dunbar2011-09-297-87/+63
| | | | | | | | be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings. - This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. llvm-svn: 140770
* Basic/Diagnostics: Add three explicit bits to DiagnosticMappingInfo to track ↵Daniel Dunbar2011-09-293-23/+85
| | | | | | | | "no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately. - No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer. llvm-svn: 140768
* Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and useDaniel Dunbar2011-09-294-48/+60
| | | | | | | that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs which then calls back into the DiagnosticsEngine. llvm-svn: 140766
* Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.Daniel Dunbar2011-09-293-12/+31
| | | | | | - Also, spell const_iterator as const_iterator. llvm-svn: 140765
* tests: Add some more tests for warning mappings.Daniel Dunbar2011-09-294-0/+36
| | | | llvm-svn: 140764
* Basic/Diagnostics: Move setDiagnosticMapping() to using DiagnosticMappingInfoDaniel Dunbar2011-09-292-12/+7
| | | | | | and eliminate setDiagnosticMappingInternal. llvm-svn: 140763
* Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch toDaniel Dunbar2011-09-294-24/+54
| | | | | | | storing mappings with that instead of straying some magic constants about the source. llvm-svn: 140760
* Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't ↵Daniel Dunbar2011-09-292-11/+1
| | | | | | worth methodizing. llvm-svn: 140759
* Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I ↵Daniel Dunbar2011-09-293-15/+7
| | | | | | killed the sole client. llvm-svn: 140756
* Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch ↵Daniel Dunbar2011-09-294-9/+32
| | | | | | | | TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker. - The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though. llvm-svn: 140752
* Fix 80-col viola.Daniel Dunbar2011-09-291-4/+4
| | | | llvm-svn: 140749
* Attempt to fix unit testsDouglas Gregor2011-09-291-0/+4
| | | | llvm-svn: 140748
* Basic/Diagnostic: Factor outDaniel Dunbar2011-09-293-14/+44
| | | | | | | | | DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which more accurately model the correct API -- no internal change to the diagnostics engine yet though. - Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option. llvm-svn: 140747
* Introduce an opt-in warning when a module is being implicitly builtDouglas Gregor2011-09-294-0/+10
| | | | | | from sources. llvm-svn: 140746
* Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor2011-09-2918-28/+94
| | | | | | | | | we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. llvm-svn: 140743
* Basic/Diagnostics: Split out the default warning "no-Werror" andDaniel Dunbar2011-09-2910-18/+40
| | | | | | | "show-in-system-header" bits, which is part of teasing them apart from the diagnostic mapping kind. llvm-svn: 140742
* Change "Regions" to be "LexicalBlocks" since that's what theyEric Christopher2011-09-294-53/+54
| | | | | | correspond to. llvm-svn: 140740
* Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don'tEric Christopher2011-09-295-8/+10
| | | | | | exist anymore. llvm-svn: 140739
* Reorder functions in the file.Eric Christopher2011-09-291-31/+30
| | | | llvm-svn: 140738
* Call UpdateLineDirectiveRegion every time we want to emit a stopEric Christopher2011-09-294-6/+8
| | | | | | | point in the code. Ensures that we don't miss any places and the check is reasonably cheap. llvm-svn: 140737
* Update comment.Eric Christopher2011-09-291-1/+2
| | | | llvm-svn: 140736
* [driver] Add basic support for escaping XML characters in CC_LOG_DIAGNOSTICSChad Rosier2011-09-282-6/+31
| | | | | | | strings. rdar://9696709 llvm-svn: 140732
* objc arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-284-16/+53
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 llvm-svn: 140729
* Check for empty predecessors for walking them.Ted Kremenek2011-09-281-1/+1
| | | | llvm-svn: 140725
* objc++ arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-282-0/+37
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This fixes the objc++ side only *auch*. // rdar://10187884 llvm-svn: 140717
* Fix typo. string-convervion -> string-conversionRichard Trieu2011-09-281-1/+1
| | | | llvm-svn: 140716
OpenPOWER on IntegriCloud