summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* remove assertions in the Hexagon backend specific clang driverSebastian Pop2012-01-132-51/+40
| | | | | | | | | | | | | | | | | | | Patch from Jyotsna Verma: I have made the changes to remove assertions in the Hexagon backend specific clang driver. Instead of asserting on invalid arch name, it has been modified to use the default value. I have changed the implementation of the CPU flag validation for the Hexagon backend. Earlier, the clang driver performed the check and asserted on invalid inputs. In the new implementation, the driver passes the last CPU flag (or sets to "v4" if not specified) to the compiler (and also to the assembler and linker which perform their own check) instead of asserting on incorrect values. This patch changes the setCPU function for the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the compiler to error out on incorrect CPU flag values. llvm-svn: 148139
* rename -ccc-host-triple into -targetSebastian Pop2012-01-132-2/+2
| | | | llvm-svn: 148138
* rename DefaultHostTriple into DefaultTargetTripleSebastian Pop2012-01-132-11/+11
| | | | llvm-svn: 148137
* Refactor for clarity.Richard Smith2012-01-131-18/+24
| | | | llvm-svn: 148135
* Don't infer a submodule for a framework's private header, at least for now.Douglas Gregor2012-01-131-14/+1
| | | | llvm-svn: 148117
* Remove --hash-style from link command on Android.Evgeniy Stepanov2012-01-131-1/+4
| | | | | | Gnu hash is not supported by the Android loader. llvm-svn: 148113
* PR11754: Reject non-static constexpr member functions in classes with virtualRichard Smith2012-01-131-17/+19
| | | | | | base classes. llvm-svn: 148094
* A base subobject type doesn't make sense for unions; don't try to compute ↵Eli Friedman2012-01-131-1/+1
| | | | | | it. Based on patch by Yin Ma. Fixes PR11751. llvm-svn: 148093
* constexpr is allowed on static member functions of non-literal classes. Per ↵Eli Friedman2012-01-131-1/+1
| | | | | | report on cfe-dev. llvm-svn: 148090
* A few minor improvements to error recovery trying to access member of a ↵Eli Friedman2012-01-131-7/+5
| | | | | | function. In particular, this restores the cool error recovery for the example from http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html , which regressed a few months back. llvm-svn: 148089
* Don't crash while trying to diagnose a function declared at block scope with anRichard Smith2012-01-132-3/+6
| | | | | | incomplete return type. llvm-svn: 148088
* Fix up the calls to CorrectTypo in Sema*ObjC.cpp to use callbackKaelyn Uhrain2012-01-132-48/+81
| | | | | | | objects, and add a basic CorrectionCandidateCallback template class to simplify the fixups. llvm-svn: 148085
* Revert previous commit. Something has gone wonky with my local configurationDouglas Gregor2012-01-131-1/+0
| | | | llvm-svn: 148084
* When inferring a module map for a framework, add the 'private'Douglas Gregor2012-01-131-0/+1
| | | | | | | requirement to headers under PrivateHeaders. We don't want to build them as part of the module (yet). llvm-svn: 148082
* [analyzer] Unwrap the pointers when ignoring the const cast.Anna Zaks2012-01-131-1/+28
| | | | | | radar://10686991 llvm-svn: 148081
* [analyzer] Taint: when looking up a binding, provide the type.Anna Zaks2012-01-131-1/+4
| | | | llvm-svn: 148080
* [analyzer] RegionStoreManager::getBinding() should not crash whenAnna Zaks2012-01-131-2/+6
| | | | | | looking up value at a CodeTextRegion even when the type is not provided. llvm-svn: 148079
* [analyzer] Fix a typo in a warning message.Anna Zaks2012-01-131-1/+1
| | | | llvm-svn: 148078
* objc parsing. Fixes a crash when parsing array initializationFariborz Jahanian2012-01-131-5/+6
| | | | | | inside a class implementation with parse errors. // rdar://10633434 llvm-svn: 148074
* Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:Richard Smith2012-01-126-38/+75
| | | | | | | | | | | | | | | | | | | | | | | - If the declarator is at the start of a line, and the previous line contained another declarator and ended with a comma, then that comma was probably a typo for a semicolon: int n = 0, m = 1, l = 2, // k = 5; myImportantFunctionCall(); // oops! - If removing the parentheses would correctly initialize the object, then produce a note suggesting that fix. - Otherwise, if there is a simple initializer we can suggest which performs value-initialization, then provide a note suggesting a correction to that initializer. Sema::Declarator now tracks the location of the comma prior to the declarator in the declaration, if there is one, to facilitate providing the note. The code to determine an appropriate initializer from the -Wuninitialized warning has been factored out to allow use in both that and -Wvexing-parse. llvm-svn: 148072
* 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
OpenPOWER on IntegriCloud