summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a regression that allowed clearly ill formed code. The diagnostic is stillChandler Carruth2010-08-311-0/+2
| | | | | | terrible, FIXME left to do a proper job of diagnosing this. llvm-svn: 112581
* Revert my lame attempt at appeasing the CFGBuilderDouglas Gregor2010-08-311-7/+0
| | | | llvm-svn: 112580
* When provide code completions for a variadic Objective-C methodDouglas Gregor2010-08-311-15/+24
| | | | | | | | declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. llvm-svn: 112579
* Teach the CFGBuilder not do die on CXXBindTemporaryExpr, ↵Douglas Gregor2010-08-311-0/+7
| | | | | | CXXOperatorCallExpr. Fixes a Boost.Graph crasher. llvm-svn: 112578
* Implement the __has_nothrow trait family, by Steven Watanabe.Sebastian Redl2010-08-312-3/+108
| | | | llvm-svn: 112577
* Add range of return value expression in ReturnUndefChecker. Patch by Jim ↵Ted Kremenek2010-08-311-0/+1
| | | | | | Goodnow II! llvm-svn: 112569
* Enable inline namespaces in C++03 as an extension.Sebastian Redl2010-08-313-4/+8
| | | | llvm-svn: 112566
* Add a forgotten place where the enclosing namespace set matters, plus a big ↵Sebastian Redl2010-08-311-2/+2
| | | | | | testcase for inline namespace fun. llvm-svn: 112565
* Enable inline namespaces in the AST.Sebastian Redl2010-08-312-1/+22
| | | | llvm-svn: 112564
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-3114-64/+80
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. llvm-svn: 112563
* Decl::getEnclosingNamespaceContext has no reason to explicitly skip ↵Sebastian Redl2010-08-311-1/+1
| | | | | | transparent contexts, and would be wrong to do so with inline namespaces. llvm-svn: 112562
* When instantiating a function type, instantiate the return type beforeDouglas Gregor2010-08-311-6/+13
| | | | | | | | | | | | | | | | | | | instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. llvm-svn: 112561
* Add a missing return. Bug noticed by Dawn Perchik!Douglas Gregor2010-08-301-0/+1
| | | | llvm-svn: 112552
* When template substitution into a template parameter reduces the levelDouglas Gregor2010-08-301-6/+8
| | | | | | | | | | | | of that parameter, reduce the level by the number of active template argument lists rather than by 1. The number of active template argument lists is only > 1 when we have a class template partial specialization of a member template of a class template that itself is a member template of another class template. ... and Boost.MSM does this. Fixes PR7669. llvm-svn: 112551
* silence a warningChris Lattner2010-08-301-1/+1
| | | | llvm-svn: 112549
* zap tabsGabor Greif2010-08-301-1/+1
| | | | llvm-svn: 112541
* Fix PR8029, a x86-32 ABI regression in introduced in r112211Chris Lattner2010-08-301-1/+0
| | | | llvm-svn: 112537
* fix dual aspect of PR8007,Gabor Greif2010-08-301-3/+19
| | | | | | | | | | namely when the friend function prototype is already used at the point of the template definition that is supposed to inject the friend function. Testcase verifies four scenarios. I would like receive some code review for this. llvm-svn: 112524
* Perform the function-to-pointer adjustment during template argumentDouglas Gregor2010-08-301-31/+43
| | | | | | | | | deduction where the parameter is a function reference, function pointer, or member function pointer and the argument is an overloaded function. Fixes <rdar://problem/8360106>, a template argument deduction issue found by Boost.Filesystem. llvm-svn: 112523
* Translate NEON vmovn builtin to a vector truncation instead of using an llvmBob Wilson2010-08-301-2/+1
| | | | | | intrinsic. llvm-svn: 112504
* Adjusted the semantics of assign checking in IdempotentOperationCheckerTom Care2010-08-301-26/+41
| | | | | | | | | | - Fixed a regression where assigning '0' would be reported - Changed the way self assignments are filtered to allow constant testing - Added a test case for assign ops - Fixed one test case where a function pointer was not considered constant - Fixed test cases relating to 0 assignment llvm-svn: 112501
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-3015-167/+29
| | | | | | some issues being sorted out. llvm-svn: 112493
* add a fixme.Chris Lattner2010-08-301-1/+5
| | | | llvm-svn: 112491
* use 'features' instead of 'PP->getLangOptions'.Chris Lattner2010-08-301-8/+8
| | | | llvm-svn: 112490
* Heap-allocate the attribute vectors inDouglas Gregor2010-08-301-1/+26
| | | | | | | | | ASTContext::DeclAttrs. Otherwise, iterators will go stale when the DenseMap reallocates, which can cause crashes when, e.g., looping over the attributes in a template to instantiate them and add the results to the instantiation of that template. llvm-svn: 112488
* Fix an corner-case assertion introduced by the refactoring in r112258;Douglas Gregor2010-08-301-0/+2
| | | | | | | when we're taking the address of a unresolvable value, it might be an implicit member access. Fixes some Boost.Spirit regressions. llvm-svn: 112487
* Now that GCC will have #pragma push/pop (in GCC 4.6), allow theDouglas Gregor2010-08-301-31/+14
| | | | | | | #pragma without requiring it to be in the "clang" namespace, from Louis Gerbarg! llvm-svn: 112484
* Emulate (some of) Microsoft's looser semantic checking of exceptionDouglas Gregor2010-08-301-0/+8
| | | | | | specifications, from Martin Vejnar! llvm-svn: 112482
* In Microsoft compatibility mode, don't parse the exponent as part ofDouglas Gregor2010-08-301-1/+10
| | | | | | | the pp-number in a hexadecimal floating point literal, from Francois Pichet! Fixes PR7968. llvm-svn: 112481
* Predeclare class type_info in Microsoft mode, from Francois Pichet!Douglas Gregor2010-08-301-0/+1
| | | | llvm-svn: 112478
* Add redeclaration checking for static data members and fix a cornerDouglas Gregor2010-08-301-3/+22
| | | | | | | case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. llvm-svn: 112476
* Fix CMake dependenciesDouglas Gregor2010-08-301-0/+6
| | | | llvm-svn: 112475
* Straighten out target triples provided on the command lineDuncan Sands2010-08-301-1/+2
| | | | | | before using them. llvm-svn: 112468
* Two minor fixes to user-defined literals:Alexis Hunt2010-08-301-0/+3
| | | | | | | - Zero-initialize UDLData so that crashes stop - Stop complaining that we can't emit them (we most certainly can) llvm-svn: 112467
* Add some braces for sanity and GCC silence. These became unbalanced in r112122,Chandler Carruth2010-08-301-1/+2
| | | | | | so please review echristo and let me know if the logic is wrong now. llvm-svn: 112466
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-2914-29/+164
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* When providing a code completion for an Objective-C message send, dropDouglas Gregor2010-08-291-5/+7
| | | | | | | | | | | | | | | | the parameter names from the completions, e.g., provide withString:(NSString *) instead of withString:(NSString *)string since the parameter name is, by convention, redundant with the selector piece that precedes it and the completions can get unnecessarily long. llvm-svn: 112456
* Improve code completion for initializer lists in constructors. InsteadDouglas Gregor2010-08-291-7/+33
| | | | | | | | | | of prioritizing just by initialization order, we bump the priority of just the *next* initializer in the list, and leave everything else at the normal priority. That way, if one intentionally skips the initialization of a base or member (to get default initialization), we'll still get ordered completion for the rest. llvm-svn: 112454
* ObjClang++: Allow declaration of block variable in a collectionFariborz Jahanian2010-08-291-1/+7
| | | | | | statement header (fixes radar 8295106). llvm-svn: 112443
* Add comments.Zhongxing Xu2010-08-291-0/+7
| | | | llvm-svn: 112414
* Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/subBob Wilson2010-08-291-8/+26
| | | | | | | | with zext/sext operations, instead of to llvm intrinsics. (We can also get rid of the clang builtins and handle these entirely in the arm_neon.h header if there is a way to express vector sext/zext in C.) llvm-svn: 112413
* Complain if a __pragma isn't terminated.John McCall2010-08-291-0/+5
| | | | llvm-svn: 112392
* Add support for Microsoft's __pragma in the preprocessor.John McCall2010-08-282-5/+61
| | | | | | Patch by Francois Pichet! llvm-svn: 112391
* When perform exact-qualifier-match template argument deduction,John McCall2010-08-281-1/+24
| | | | | | | properly account for the possibility that certain opaque types might be more qualified than they appear. Fixes PR7708. llvm-svn: 112390
* If filtering a lookup result leaves it ambiguous, keep the ambiguity John McCall2010-08-281-1/+6
| | | | | | kind. Fixes PR7252. llvm-svn: 112383
* Delete the relaxedLiveness object in the dtor of AnalysisContext.Ted Kremenek2010-08-281-0/+1
| | | | llvm-svn: 112380
* improve comment, patch by Vladimir Kirillov!Chris Lattner2010-08-281-2/+3
| | | | llvm-svn: 112374
* simplify by relying on cascading operator->Gabor Greif2010-08-281-3/+3
| | | | llvm-svn: 112373
* simplifyGabor Greif2010-08-281-2/+3
| | | | llvm-svn: 112372
* suppress annoying textual repetition as 'aka'Gabor Greif2010-08-281-4/+7
| | | | llvm-svn: 112365
OpenPOWER on IntegriCloud