summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* "This change adds alloca/valloc checks to UnixAPIChecker. It includes a ↵Ted Kremenek2012-01-111-48/+61
| | | | | | | | | | | | small refactoring for the common *alloc functions as well as a few tiny wibbles (adds a note to CWE/CERT advisory numbers in the bug output, and fixes a couple 80-column-wide violations.)" Patch by Austin Seipp! llvm-svn: 147931
* C11 allows typedefs to be redefined. Implement this in C11 mode, andDouglas Gregor2012-01-111-4/+2
| | | | | | | downgrade the default-error warning to an ExtWarn in C90/99. <rdar://problem/10668057> llvm-svn: 147925
* Revert changes to lib/Driver in r147917; I didn't mean to commit this.Eli Friedman2012-01-111-20/+19
| | | | llvm-svn: 147920
* Add elidable CXXConstructExpr as block-level expr. It converts an lvalue to ↵Zhongxing Xu2012-01-111-2/+1
| | | | | | a rvalue, which is a useful step during AST evaluation. llvm-svn: 147918
* Start refactoring code for capturing variables and 'this' so that it is ↵Eli Friedman2012-01-115-76/+77
| | | | | | shared between lambda expressions and block literals. llvm-svn: 147917
* Remove '#if 0' from ExprEngine::InlineCall(), and start fresh by wiring up ↵Ted Kremenek2012-01-114-115/+89
| | | | | | | | | | inlining for straight C calls. My hope is to reimplement this from first principles based on the simplifications of removing unneeded node builders and re-evaluating how C++ calls are handled in the CFG. The hope is to turn inlining "on-by-default" as soon as possible with a core set of things working well, and then expand over time. llvm-svn: 147904
* Do placeholder conversions on array bounds in both declarators andJohn McCall2012-01-112-4/+14
| | | | | | new-expressions. llvm-svn: 147900
* Remove switch/case statements and call GetFloatingPointTy() instead to get theAkira Hatanaka2012-01-101-13/+1
| | | | | | floating point type. llvm-svn: 147894
* Flatten float complex arguments. N32/64 requires float complex arguments beAkira Hatanaka2012-01-101-4/+28
| | | | | | passed in floating point registers. llvm-svn: 147892
* Remove space.Akira Hatanaka2012-01-101-2/+2
| | | | llvm-svn: 147889
* Add field IsIEEE in FloatingLiteral to distinguish between different 128-bitAkira Hatanaka2012-01-101-1/+1
| | | | | | floating point formats. llvm-svn: 147887
* When something goes wrong in type-checking a namespace definition, make the ↵Douglas Gregor2012-01-101-1/+5
| | | | | | namespace declaration invalid llvm-svn: 147882
* Add support for the androideabi environment to our triple support, andChandler Carruth2012-01-103-2/+15
| | | | | | | | | | for the arm-linux-androideabi triple in particular. Also use this to do a better job of selecting soft FP settings. Patch by Evgeniy Stepanov. llvm-svn: 147872
* objc-arc: fixes a crash when trying to find out retaining cycleFariborz Jahanian2012-01-101-4/+12
| | | | | | ownership of property sent to 'super'. // rdar://10640891 llvm-svn: 147868
* Remove a set, but unused variable. Found with GCC's warning.Chandler Carruth2012-01-101-4/+1
| | | | llvm-svn: 147864
* Contrary to the other BSDs, NetBSD followed the ELF ABI for structureJoerg Sonnenberger2012-01-101-1/+0
| | | | | | passing on i386 and does not use registers. llvm-svn: 147856
* Make PathDiagnosticLocation more resilient to null Stmt pointers.Ted Kremenek2012-01-101-0/+6
| | | | llvm-svn: 147854
* Add definitions for AMD's bobcat (aka btver1)Benjamin Kramer2012-01-101-2/+18
| | | | llvm-svn: 147849
* Enable POPCNT and LZCNT with sse4a.Benjamin Kramer2012-01-101-1/+1
| | | | llvm-svn: 147848
* Factor the repetitive cpu macro definition into a helper function.Benjamin Kramer2012-01-101-45/+23
| | | | llvm-svn: 147847
* The `-fwritable-strings' flag doesn't make the backing store strings of allBill Wendling2012-01-101-10/+6
| | | | | | | | | | | CFStrings writable. The strings (both Unicode and ASCII) should reside in a read-only section. E.g., __TEXT,__cstring instead of __DATA,__data. This is done by making the global variable created for the strings constant despite the value of that flag. <rdar://problem/10657500> llvm-svn: 147845
* Implement the missing pieces of Evaluate for _Complex types. With that ↵Eli Friedman2012-01-104-38/+46
| | | | | | complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) llvm-svn: 147840
* PR11724: Implement evaluation for constexpr defaulted trivial union copy/moveRichard Smith2012-01-101-2/+16
| | | | | | | constructors. These are a special case whose behavior cannot be modeled as a user-written constructor. llvm-svn: 147839
* Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; ↵Eli Friedman2012-01-101-1/+0
| | | | | | make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext(). llvm-svn: 147837
* Update C++11 scoped enumeration support to match the final proposal:Richard Smith2012-01-105-18/+38
| | | | | | | | - 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-101-6/+15
| | | | | | | | | 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-103-39/+170
| | | | | | | 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-091-2/+2
| | | | llvm-svn: 147812
* Extend the diagnostic for a ',' at the end of a declaration where a ';' wasRichard Smith2012-01-092-7/+31
| | | | | | intended to cover C++ class definitions. llvm-svn: 147808
* Fix "note" of a duplicate explicit instantiation definition following a ↵Nico Weber2012-01-091-9/+20
| | | | | | specialization. llvm-svn: 147798
* Insert padding before unaligned long double arguments.Akira Hatanaka2012-01-091-13/+28
| | | | 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
* When deserializing an anonymous namespace from a module, do not attachDouglas Gregor2012-01-091-8/+16
| | | | | | | | 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-091-5/+11
| | | | | | | | | | 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-093-15/+63
| | | | | | | | | 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-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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-091-1/+1
| | | | 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
* Pack UsingDecl more.Benjamin Kramer2012-01-073-8/+9
| | | | | | 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-073-28/+20
| | | | llvm-svn: 147730
* Switch NamespaceDecl from its own hand-rolled redeclaration chain overDouglas Gregor2012-01-077-132/+149
| | | | | | | | | | | | 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-077-37/+90
| | | | | | 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-072-7/+93
| | | | | | | | | 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
* Lambdas: semantic analysis of explicit captures.Eli Friedman2012-01-071-5/+78
| | | | | | 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-073-82/+30
| | | | | | | | ExprEngine::processCallEnter(). This removes analysis of other translation units, but that was an experimental feature anyway that we will revisit later. llvm-svn: 147705
OpenPOWER on IntegriCloud