summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; ↵Eli Friedman2012-01-102-2/+1
| | | | | | make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext(). llvm-svn: 147837
* [arcmt] XFAIL on mingw.Argyrios Kyrtzidis2012-01-1032-32/+32
| | | | llvm-svn: 147830
* Update C++11 scoped enumeration support to match the final proposal:Richard Smith2012-01-1011-23/+84
| | | | | | | | - reject definitions of enums within friend declarations - require 'enum', not 'enum class', for non-declaring references to scoped enumerations llvm-svn: 147824
* Add -g to the cc1as flags only if we're dealing with an originalEric Christopher2012-01-102-6/+19
| | | | | | | | | source file. Otherwise -g -save-temps will error out on the compile of any .c file. Fixes about 4000 of the errors in the clang-tests gdb test suite. llvm-svn: 147819
* Remove extraneous braces.Eric Christopher2012-01-101-2/+1
| | | | llvm-svn: 147818
* objc++: patch for IRgen for atomic properties ofFariborz Jahanian2012-01-107-46/+233
| | | | | | | c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 llvm-svn: 147817
* Don't crash with -Wlarge-by-value-copy and a dependent type. PR11726.Eli Friedman2012-01-092-2/+7
| | | | llvm-svn: 147812
* Extend the diagnostic for a ',' at the end of a declaration where a ';' wasRichard Smith2012-01-095-8/+62
| | | | | | intended to cover C++ class definitions. llvm-svn: 147808
* Fix "note" of a duplicate explicit instantiation definition following a ↵Nico Weber2012-01-092-18/+26
| | | | | | specialization. llvm-svn: 147798
* Insert padding before unaligned long double arguments.Akira Hatanaka2012-01-092-14/+41
| | | | llvm-svn: 147791
* Move the piece of code up that skips the padding argument. Without this change,Akira Hatanaka2012-01-091-4/+4
| | | | | | padding insertion will not work if the coerced type is not a structure. llvm-svn: 147786
* Restore some parts of this test which were accidental reverted in r147649.Richard Smith2012-01-091-0/+6
| | | | | | Thanks to David Blaikie for pointing this out. llvm-svn: 147783
* When deserializing an anonymous namespace from a module, do not attachDouglas Gregor2012-01-095-8/+64
| | | | | | | | the anonymous namespace to its parent. Semantically, this means that the anonymous namespaces defined in one module are distinct from the anonymous namespaces defined in another module. llvm-svn: 147782
* Implement merging of namespace-scope declarations across modules, soDouglas Gregor2012-01-094-5/+48
| | | | | | | | | | that we can merge, for example, two occurrences of namespace N { void f(); } in two disjoint modules. llvm-svn: 147780
* Implement redeclaration merging for namespaces defined in distinctDouglas Gregor2012-01-097-16/+127
| | | | | | | | | modules. Teach name lookup into namespaces to search in each of the merged DeclContexts as well as the (now-primary) DeclContext. This supports the common case where two different modules put something into the same namespace. llvm-svn: 147778
* Always allow redefinition of typedefs when modules are enabled. ThisDouglas Gregor2012-01-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | is important because it's fairly common for headers (especially system headers) to want to provide only those typedefs needed for that particular header, based on some guard macro, e.g., #ifndef _SIZE_T #define _SIZE_T typedef long size_t; #endif which is repeated in a number of headers. The guard macro protects against duplicate definitions. However, this means that only the first occurrence of this pattern actually defines size_t, so the submodule corresponding to this header has the only visible definition. If a user then imports a different submodule from the same module, size_t will be known but not visible, and therefore cannot be used. By allowing redefinition of typedefs, each header that wants to define size_t can do so independently, so it will be available in the corresponding submodules. llvm-svn: 147775
* Made unknown builtin diagnostic remappable.Abramo Bagnara2012-01-092-2/+3
| | | | llvm-svn: 147774
* Merge AVX/AVX2 into the SSE level.Craig Topper2012-01-091-23/+12
| | | | llvm-svn: 147771
* objc++: more atomic property api code forFariborz Jahanian2012-01-082-12/+29
| | | | | | c++ object properties. wip. llvm-svn: 147750
* Remove unused variable.Rafael Espindola2012-01-071-1/+0
| | | | llvm-svn: 147744
* Remove unused include of VectorExtras.h.Benjamin Kramer2012-01-071-1/+0
| | | | llvm-svn: 147737
* Pack UsingDecl more.Benjamin Kramer2012-01-074-17/+17
| | | | | | 88 -> 80 bytes on x86_64. llvm-svn: 147736
* objc++: More codegen stuff for atomic properties of c++ objectsFariborz Jahanian2012-01-072-9/+22
| | | | | | with non-trivial copies. // rdar://6137845 llvm-svn: 147735
* [analyzer] Fix use-after-free in HandleTranslationUnit.Anna Zaks2012-01-071-6/+9
| | | | | | | | | | | | | A patch by Dmitri Gribenko! The attached patch fixes a use-after-free in AnalysisConsumer::HandleTranslationUnit. The problem is that BugReporter's destructor runs after AnalysisManager has been already deleted. The fix introduces a scope to force correct destruction order. A crash happens only when reports have been added in AnalysisConsumer::HandleTranslationUnit's BugReporter. We don't have such checkers in clang so no test. llvm-svn: 147732
* Fixed TypeofExpr AST and code generation.Abramo Bagnara2012-01-075-33/+20
| | | | llvm-svn: 147730
* Switch NamespaceDecl from its own hand-rolled redeclaration chain overDouglas Gregor2012-01-0714-209/+286
| | | | | | | | | | | | to Redeclarable<NamespaceDecl>, so that we benefit from the improveed redeclaration deserialization and merging logic provided by Redeclarable<T>. Otherwise, no functionality change. As a drive-by fix, collapse the "inline" bit into the low bit of the original namespace/anonymous namespace, saving 8 bytes per NamespaceDecl on x86_64. llvm-svn: 147729
* More lambda work: semantic analysis of capturing 'this'. It's a bit ↵Eli Friedman2012-01-0713-48/+140
| | | | | | complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.) llvm-svn: 147723
* [analyzer] Add basic format string vulnerability checking.Anna Zaks2012-01-074-9/+109
| | | | | | | | | We already have a more conservative check in the compiler (if the format string is not a literal, we warn). Still adding it here for completeness and since this check is stronger - only triggered if the format string is tainted. llvm-svn: 147714
* [arcmt] Disable tests in mingw, no idea why they are failing there.Argyrios Kyrtzidis2012-01-0732-0/+33
| | | | llvm-svn: 147713
* Lambdas: semantic analysis of explicit captures.Eli Friedman2012-01-074-8/+151
| | | | | | This patch (and some of my other commits related to lambdas) is heavily based off of John Freeman's work-in-progress patches. llvm-svn: 147706
* [analyzer] Remove CallEnterNodeBuilder and simplify ↵Ted Kremenek2012-01-076-133/+33
| | | | | | | | ExprEngine::processCallEnter(). This removes analysis of other translation units, but that was an experimental feature anyway that we will revisit later. llvm-svn: 147705
* Add field PaddingType to ABIArgInfo which specifies the type of padding thatAkira Hatanaka2012-01-074-16/+74
| | | | | | | | is inserted before the real argument. Padding is needed to ensure the backend reads from or writes to the correct argument slots when the original alignment of a byval structure is unavailable due to flattening. llvm-svn: 147699
* Correctly enqueue successors in ExprEngine::processCallExit().Ted Kremenek2012-01-071-2/+6
| | | | llvm-svn: 147698
* [analyzer] Remove CallExitNodeBuilder, and have ↵Ted Kremenek2012-01-075-41/+20
| | | | | | | | ExprEngine::processCallExit() do the work manually. This is a nice simplification. Along the way, fix Exprengine::processCallExit() to also perform the postStmt callback for checkers for CallExprs. llvm-svn: 147697
* Suppress -Wunused-value within macros from system headers.Matt Beaumont-Gay2012-01-065-14/+48
| | | | | | | Along the way, move a helper function from SemaChecking.cpp to a more accessible home in SourceManager. llvm-svn: 147692
* objc++: more code gen stuff for atomic property api,Fariborz Jahanian2012-01-064-15/+78
| | | | | | | | currently turned off. // rdar://6137845 Also, fixes a test case which should be nonatomic under new API. llvm-svn: 147691
* [analyzer] Make the entries in 'Environment' context-sensitive by making ↵Ted Kremenek2012-01-0655-474/+648
| | | | | | | | | | | | | | | | | | entries map from (Stmt*,LocationContext*) pairs to SVals instead of Stmt* to SVals. This is needed to support basic IPA via inlining. Without this, we cannot tell if a Stmt* binding is part of the current analysis scope (StackFrameContext) or part of a parent context. This change introduces an uglification of the use of getSVal(), and thus takes two steps forward and one step back. There are also potential performance implications of enlarging the Environment. Both can be addressed going forward by refactoring the APIs and optimizing the internal representation of Environment. This patch mainly introduces the functionality upon when we want to build upon (and clean up). llvm-svn: 147688
* During name lookup, use redecl_iterator to walk over the redeclarationDouglas Gregor2012-01-062-25/+11
| | | | | | | | | | | | | chain to determine whether any declaration of the given entity is visible, eliminating the redundant (and less efficient) getPreviousDeclaration() implementation. This tweak uncovered an omission in the handling of RedeclarableTemplateDecl, where we weren't making sure to search for additional redeclarations of a template in other module files. Things would be cleaner if RedeclarableTemplateDecl actually used Redeclarable. llvm-svn: 147687
* Revert r147664; it's breaking clang regression tests.Eli Friedman2012-01-066-8/+8
| | | | llvm-svn: 147681
* 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
OpenPOWER on IntegriCloud