summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Recommit r148056 with fixes to deal with weirdness with bitfields in unions.Eli Friedman2012-01-121-4/+4
| | | | | | Original message: Make sure adding a field to a struct never reduces its size. PR11745. llvm-svn: 148070
* Revert r148056 while I investigate failures.Eli Friedman2012-01-121-4/+5
| | | | llvm-svn: 148068
* Make sure adding a field to a struct never reduces its size. PR11745.Eli Friedman2012-01-121-5/+4
| | | | llvm-svn: 148056
* Adjust set of default checkers.Ted Kremenek2012-01-121-2/+0
| | | | llvm-svn: 148055
* If an ObjCMessageExpr is implicit, there are no source locations for theArgyrios Kyrtzidis2012-01-121-3/+5
| | | | | | | | selector identifiers. It was difficult to form a test case for it unfortunately. llvm-svn: 148053
* Convert SemaCXXScopeSpec.cpp to pass a callback object to CorrectTypo,Kaelyn Uhrain2012-01-121-3/+22
| | | | | | improvng the typo correction results in certain situations. llvm-svn: 148052
* objc: do not warn when converting to a const id qualfied by itsFariborz Jahanian2012-01-121-1/+3
| | | | | | list of protools. // rdar://10669694 llvm-svn: 148051
* Convert SemaInit.cpp to pass a callback object to CorrectTypo.Kaelyn Uhrain2012-01-121-7/+25
| | | | | | | And once again improve the typo correction results in certain situations just by moving the existing checks on the correction. llvm-svn: 148037
* [analyzer] fix inlining's handling of mapping actual to formal arguments and ↵Ted Kremenek2012-01-124-17/+42
| | | | | | limit the call stack depth. The analyzer can now accurately simulate factorial for limited depths. llvm-svn: 148036
* constexpr: initialization of a union from an empty initializer-list shouldRichard Smith2012-01-121-8/+23
| | | | | | | | | zero-initialize the first union member. Also fix a bug where initializing an array of types compatible with wchar_t from a wide string literal failed in C, and fortify the C++ tests in this area. This part can't be tested without a code change to enable array evaluation in C (where an existing test fails). llvm-svn: 148035
* scanf: parse the 'm' length modifier, and check that the right argumentsHans Wennborg2012-01-123-3/+37
| | | | | | are used with that and the 'a' length modifier. llvm-svn: 148029
* In Objective-C++, actually compute the base type of a member accessDouglas Gregor2012-01-122-12/+23
| | | | | | | | expression for an Objective-C object or pointer type, so that we don't attempt to treat the member name as a template. Fixes <rdar://problem/10672501>. llvm-svn: 148028
* scanf analysis: the 'a' length modifier is valid with a scanlistHans Wennborg2012-01-121-0/+1
| | | | | | | Before r148025 we (accidentally) didn't check whether a length modifier is appropriate for a scanlist, but now we do. llvm-svn: 148026
* scanf analysis: don't bail out after successful parse of scanlistHans Wennborg2012-01-121-1/+1
| | | | llvm-svn: 148025
* Allow constant-folding of references which were formed in a manner not permittedRichard Smith2012-01-121-10/+6
| | | | | | in a constant expression, for compatibility with g++. llvm-svn: 148020
* Add IsImplicit field in ObjCMessageExpr that is true when the messageArgyrios Kyrtzidis2012-01-126-61/+116
| | | | | | | | | | was constructed, e.g. for a property access. This allows the selector identifier locations machinery for ObjCMessageExpr to function correctly, in that there are not real locations to handle/report for such a message. llvm-svn: 148013
* [analyzer] Rename Store::Retrieve() -> getBinding().Anna Zaks2012-01-123-64/+69
| | | | | | + all the other Retrieve..() methods + a comment for ElementRegion. llvm-svn: 148011
* [analyzer] Add taint transfer by strcpy & others (part 1).Anna Zaks2012-01-121-89/+100
| | | | | | | | | | | | To simplify the process: Refactor taint generation checker to simplify passing the information on which arguments need to be tainted from pre to post visit. Todo: We need to factor out the code that sema is using to identify the string and memcpy functions and use it here and in the CString checker. llvm-svn: 148010
* Formatting.Eric Christopher2012-01-121-1/+1
| | | | llvm-svn: 147989
* Formatting.Eric Christopher2012-01-121-1/+1
| | | | llvm-svn: 147988
* Take into account the pointer to an aggregate that is passed as a hiddenAkira Hatanaka2012-01-121-2/+6
| | | | | | argument when Offset is initialized. llvm-svn: 147986
* Call CodeGenTypes::ConvertType to get LLVM::Type*.Akira Hatanaka2012-01-121-25/+4
| | | | | | Remove function MipsABIInfo::GetFloatingPointTy. llvm-svn: 147985
* Fix some edge cases with C++ casts and placeholder expressions.Eli Friedman2012-01-121-12/+15
| | | | llvm-svn: 147984
* objective-c: fixes a regression in looking up namesFariborz Jahanian2012-01-121-2/+5
| | | | | | | in class extensions and categories by recent refactoring of objc class ASTs. // rdar://1066654 llvm-svn: 147982
* Improve the diagnostic when trying to redefine a typedef with aDouglas Gregor2012-01-111-1/+12
| | | | | | variably-modified type. llvm-svn: 147973
* Fix the caching in CorrectTypo so that other non-keyword identifiersKaelyn Uhrain2012-01-112-2/+4
| | | | | | | | | | | | | | are still added if the cached correction fails validation. Also fix a copy-and-paste error in a comment from my previous commit. Finally, add an example of the benefit the typo correction callback adds to TryNamespaceTypoCorrection--which happens to also tickle the above caching problem, as the only way a non-namespace Decl would be added to the possible corrections is if it was cached as the correction for a previous instance of the same typo where the typo was corrected to a non-namespace via a different code path. llvm-svn: 147968
* minor refactoring to improve compile-time performance.Fariborz Jahanian2012-01-111-2/+2
| | | | llvm-svn: 147963
* Add initial callback object support to Sema::CorrectTypo.Kaelyn Uhrain2012-01-112-103/+182
| | | | | | | | | Also includes two examples of the callback: a wrapper/replacement for the CorrectTypoContext enum, and a conversion of the two calls to CorrectTypo in SemaDeclCXX.cpp (one of which provides verifiable improvement to the typo correction, as demonstrated in the added test). llvm-svn: 147962
* objc-arc: evaluate 'readonly' property with no knownFariborz Jahanian2012-01-111-6/+55
| | | | | | | life-time to that of its backing 'ivar's lifetime. // rdar://10558871 llvm-svn: 147956
* constexpr: fix typo resulting in move constructors sometimes not beingRichard Smith2012-01-111-2/+2
| | | | | | implicitly marked constexpr when they should be. llvm-svn: 147955
* Fix -mfpu parsing on ARM.Evgeniy Stepanov2012-01-112-2/+13
| | | | | | | | | - Support gcc-compatible vfpv3 name in addition to vfp3. - Support vfpv3-d16. - Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions for those!). llvm-svn: 147943
* Fixed VLA code generation.Abramo Bagnara2012-01-111-14/+22
| | | | llvm-svn: 147933
* "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
OpenPOWER on IntegriCloud