summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix uninitialized variable warning.Chad Rosier2012-01-061-2/+2
| | | | llvm-svn: 147678
* Revert r147655; it's breaking the compiler_rt build on OSX.Eli Friedman2012-01-062-22/+1
| | | | llvm-svn: 147677
* Thread safety analysis: added support for trylock attribute.DeLesley Hutchins2012-01-062-3/+224
| | | | llvm-svn: 147672
* Added LocalVariableMapDeLesley Hutchins2012-01-061-44/+536
| | | | llvm-svn: 147670
* __FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults toJoerg Sonnenberger2012-01-061-1/+15
| | | | | | "double" rounding. llvm-svn: 147669
* objc++: some declarations related to atomicFariborz Jahanian2012-01-063-0/+34
| | | | | | | properties of c++ object types with non-trivial assignment copy. Not used yet. // rdar://6137845 llvm-svn: 147666
* Silence GCC warnings.Jakub Staszak2012-01-066-8/+8
| | | | llvm-svn: 147664
* [asan] mention -fno-omit-frame-pointer in the docsKostya Serebryany2012-01-061-1/+3
| | | | llvm-svn: 147663
* When inferring a submodule ID during module creation, look up theDouglas Gregor2012-01-063-9/+30
| | | | | | | | | | include stack to find the first file that is known to be part of the module. This copes with situations where the module map doesn't completely specify all of the headers that are involved in the module, which can come up when there are very strange #include_next chains (e.g., with weird compiler/stdlib headers like stdarg.h or float.h). llvm-svn: 147662
* [analyzer] Correct the c++-analyzer symlinkAnna Zaks2012-01-061-1/+1
| | | | | | As Matt pointed out, this should be just a link to 'ccc-analyzer'. llvm-svn: 147661
* Stash Decl's TopLevelDeclInObjCContainer and ModulePrivate bitsDouglas Gregor2012-01-065-50/+73
| | | | | | | | into the two unused lower bits of the NextDeclInContext link, dropping the number of bits in Decl down to 32, and saving 8 bytes per declaration on x86-64. llvm-svn: 147660
* C++11 generalized constant expressions: implement checking and diagnostics forRichard Smith2012-01-065-257/+378
| | | | | | | pointer-arithmetic-related undefined behavior and unspecified results. We continue to fold such values, but now notice they aren't constant expressions. llvm-svn: 147659
* Introduce a "Hidden" bit into Decl, to track whether that declarationDouglas Gregor2012-01-065-10/+17
| | | | | | | | | | is hidden from name lookup. The previous hack of tweaking the ModulePrivate bit when loading a declaration from a hidden submodule was brittle. Note that we now have 34 bits in Decl. I'll fix that next. llvm-svn: 147658
* Teach DeclContext deserialization to pay attention to endianness, fromDouglas Gregor2012-01-062-2/+4
| | | | | | David Fang and Takumi Nakamura. Fixes many PCH failures on PowerPC. llvm-svn: 147657
* If we are compiling with -fno-builtin then don't do constant folding ofDavid Chisnall2012-01-062-1/+22
| | | | | | | | builtins. This fixes PR11711. llvm-svn: 147655
* Fix the mangling of class template arguments in a particularJohn McCall2012-01-062-2/+26
| | | | | | dependent case. Thanks to Jason Merrill for pointing this out. llvm-svn: 147653
* Improvements to the uninitialized variable warning: Check if the constructorRafael Espindola2012-01-063-5/+55
| | | | | | | call is elidable or if the constructor is trivial instead of checking if it is user declared. llvm-svn: 147652
* More lambda work. Fixes a minor bug Richard pointed out, makes lookup for ↵Eli Friedman2012-01-066-20/+79
| | | | | | lambda parameters work correctly, recording more information into the AST. llvm-svn: 147650
* David Blaikie and Chandler would like us to diagnoseRichard Smith2012-01-065-17/+12
| | | | | | | | int f(); in function scopes under -Wvexing-parse, so now we do. llvm-svn: 147649
* [analyzer] c++-analyzer should be a symlink.Anna Zaks2012-01-061-682/+1
| | | | | | This fixes a regression from r147643. llvm-svn: 147648
* [analyzer] Update the docs to reflect that gcc is not the only defaultAnna Zaks2012-01-062-19/+18
| | | | | | compiler option. llvm-svn: 147645
* [analyzer] scan-build: If we are on MacOS, use clang as the defaultAnna Zaks2012-01-062-4/+24
| | | | | | compiler. llvm-svn: 147644
* [analyzer] Skip --serialize-diagnostic when running scan-build.Anna Zaks2012-01-062-2/+674
| | | | | | | Otherwise, the analyzer will try to analyze the serialized diagnostic file as if it were a source file. llvm-svn: 147643
* Tweak to r147599 for PR10828: Move the check from the parser into sema, and useRichard Smith2012-01-067-28/+36
| | | | | | | the Semantic Powers to only warn on class types (or dependent types), where the constructor or destructor could do something interesting. llvm-svn: 147642
* Minor refactoring of sentinel warning on blocks. Add a test for this warning.Eli Friedman2012-01-063-11/+7
| | | | llvm-svn: 147641
* objc++: sythesize a helper function to be usedFariborz Jahanian2012-01-062-2/+91
| | | | | | | | for copying atomic properties of c++ objects with non-trivial copy assignment in setters/getters. Not yet used. // rdar://6137845 llvm-svn: 147636
* Fix a memory leak of PragmaNamespaces, rdar://10611796.Argyrios Kyrtzidis2012-01-061-1/+3
| | | | llvm-svn: 147635
* Address Richard's review comments on r147561 (Evaluate support for ↵Eli Friedman2012-01-054-6/+26
| | | | | | address-of-label differences). llvm-svn: 147631
* Always allocate an extra 8 bytes for a deserialized declaration, sinceDouglas Gregor2012-01-051-8/+5
| | | | | | some code in Clang expects 8-byte alignment of declarations. llvm-svn: 147626
* After further discussion, rename attribute ↵Ted Kremenek2012-01-059-25/+25
| | | | | | 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'. llvm-svn: 147622
* Tweak the fix to PR8977: an empty expression-list represents value ↵Eli Friedman2012-01-055-10/+19
| | | | | | initialization, not default initialization. Fixes PR11712. llvm-svn: 147620
* Don't seed the ASTWriter's declaration -> ID mapping with the IDs ofDouglas Gregor2012-01-053-11/+23
| | | | | | | each deserialized declaration, since that information is already available in each declaration. llvm-svn: 147619
* When we deserialize a declaration from a module file, allocate extraDouglas Gregor2012-01-055-28/+24
| | | | | | | | | | | | | | | storage for the global declaration ID. Declarations that are parsed (rather than deserialized) are unaffected, so the number of declarations that pay this cost tends to be relatively small (since relatively few declarations are ever deserialized). This replaces a largish DenseMap within the AST reader. It's not strictly a win in terms of memory use---not every declaration was added to that DenseMap in the first place---but it's cleaner to have this information available for every deserialized declaration, so that future clients can rely on it. llvm-svn: 147617
* When creating declarations that are deserialized from an module file,Douglas Gregor2012-01-0513-198/+503
| | | | | | | go through a central allocation routine Decl::AllocateDeserializedDecl(). No actual functionality change (yet). llvm-svn: 147614
* When loading an AST file, set SourceManager::MainFileID to the main file of ↵Argyrios Kyrtzidis2012-01-054-29/+33
| | | | | | | | the AST file, as suggested by Tom Honermann. llvm-svn: 147612
* PR10828: Produce a warning when a no-arguments function is declared in blockRichard Smith2012-01-0510-17/+46
| | | | | | | | | | | | | | | | | scope, when no other indication is provided that the user intended to declare a function rather than a variable. Remove some false positives from the existing 'parentheses disambiguated as a function' warning by suppressing it when the declaration is marked as 'typedef' or 'extern'. Add a new warning group -Wvexing-parse containing both of these warnings. The new warning is enabled by default; despite a number of false positives (and one bug) in clang's test-suite, I have only found genuine bugs with it when running it over a significant quantity of real C++ code. llvm-svn: 147599
* More lambda work. Tweak the Sema interface slightly. Start adding the ↵Eli Friedman2012-01-0510-44/+141
| | | | | | pieces to build the lambda class and its call operator. Create an actual scope for the lambda body. llvm-svn: 147595
* [driver] Add support for passing -lazy_framework/-lazy_library to the linker.Chad Rosier2012-01-052-0/+16
| | | | | | rdar://10630328 llvm-svn: 147591
* Change casting slightly to avoid warnings about casting away const.Eli Friedman2012-01-051-2/+2
| | | | llvm-svn: 147589
* When we're performing name lookup for a tag, we still allow ourselvesDouglas Gregor2012-01-054-5/+13
| | | | | | | | | | | | | | | | | | to see hidden declarations because every tag lookup is effectively a redeclaration lookup. For example, image that struct foo; is declared in a submodule that is known but hasn't been imported. If someone later writes struct foo *foo_p; then "struct foo" is either a reference or a redeclaration. To keep the redeclaration chains sound, we treat it like a redeclaration for name-lookup purposes. llvm-svn: 147588
* Minor cleanup; no functional change.Eli Friedman2012-01-051-3/+2
| | | | llvm-svn: 147582
* Sanity checks in SourceManager::getFileEntryForID() and ↵Argyrios Kyrtzidis2012-01-051-2/+8
| | | | | | | | SourceManager::getFileEntryForSLocEntry() to make sure we do not crash. rdar://10594186 llvm-svn: 147576
* The value of a const weak variable is not an integer constant.John McCall2012-01-055-2/+30
| | | | llvm-svn: 147575
* If we already have a definition for a top-level module that we deserialized ↵Douglas Gregor2012-01-051-0/+13
| | | | | | from a module file, don't bother parsing a new definition llvm-svn: 147574
* Fixes a code gen bug for setter code for a property ofFariborz Jahanian2012-01-052-1/+33
| | | | | | | | c++ object reference type with trivial copy constructor. This causes an assert crash and bad code gen. when assert is off. // rdar://6137845 llvm-svn: 147573
* When generating includes for all of the headers we found in anDouglas Gregor2012-01-053-4/+20
| | | | | | | umbrella directory, skip includes for any headers that are part of an unavailable module. llvm-svn: 147572
* [analyzer] Add another tests to taint tester.Anna Zaks2012-01-041-0/+9
| | | | llvm-svn: 147570
* [analyzer] Be less pessimistic about invalidation of global variablesAnna Zaks2012-01-0416-125/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | as a result of a call. Problem: Global variables, which come in from system libraries should not be invalidated by all calls. Also, non-system globals should not be invalidated by system calls. Solution: The following solution to invalidation of globals seems flexible enough for taint (does not invalidate stdin) and should not lead to too many false positives. We split globals into 3 classes: * immutable - values are preserved by calls (unless the specific global is passed in as a parameter): A : Most system globals and const scalars * invalidated by functions defined in system headers: B: errno * invalidated by all other functions (note, these functions may in turn contain system calls): B: errno C: all other globals (which are not in A nor B) llvm-svn: 147569
* [analyzer] Correct the error message in the testing infrastructure.Anna Zaks2012-01-041-2/+1
| | | | llvm-svn: 147568
* Rename attribute 'objc_suppress_autosynthesis' to ↵Ted Kremenek2012-01-046-13/+13
| | | | | | 'objc_disable_automatic_synthesis'. llvm-svn: 147567
OpenPOWER on IntegriCloud