summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a small bug in the linkage computation for the lambda ↵Eli Friedman2013-06-131-1/+1
| | | | | | conversion-to-function-pointer member. llvm-svn: 183931
* Update for llvm change.Rafael Espindola2013-06-131-2/+3
| | | | llvm-svn: 183930
* Allow clang to build __clear_cache on ARM.Rafael Espindola2013-06-131-1/+2
| | | | | | | | | __clear_cache is special. It needs no signature, but is a real function in compiler_rt or libgcc. Patch by Andrew Turner. llvm-svn: 183926
* InheritViz.cpp uses sys::Path, include PathV1.hRafael Espindola2013-06-131-0/+1
| | | | llvm-svn: 183922
* Use version of DisplayGraph that takes a StringRef.Rafael Espindola2013-06-131-1/+1
| | | | llvm-svn: 183916
* Teach clang about the armv4/armv4t distinctionTim Northover2013-06-132-4/+10
| | | | | | | | | When choosing a default CPU, clang used to pick ARM7TDMI (which has Thumb) even when the more restrictive armv4 triple was specified. This should fix that. Patch by Jeroen Hofstee. llvm-svn: 183905
* Modernize some low-hanging PathV1 uses.Benjamin Kramer2013-06-133-24/+27
| | | | llvm-svn: 183903
* Add Ubuntu Saucy to the list of known Ubuntu releasesSylvestre Ledru2013-06-131-1/+3
| | | | | | | Thanks to Dmitry Shachnev for the patch See bug #16317 llvm-svn: 183899
* More for PR12457: fix handling of __builtin_isinf_sign and test.Richard Smith2013-06-131-1/+1
| | | | llvm-svn: 183890
* Towards PR12457: constant expression evaluation support for ↵Richard Smith2013-06-131-14/+63
| | | | | | __builtin_parity{,l,ll}, __builtin_ffs{,l,ll}, and __builtin_fpclassify. llvm-svn: 183889
* Fix part of PR12457. Patch by Justin Bogner!Richard Smith2013-06-131-0/+34
| | | | llvm-svn: 183886
* C++11: If a class has a user-declared copy operation or destructor, theRichard Smith2013-06-131-1/+67
| | | | | | | | implicit definition of a copy operation is deprecated. Add a warning for this to -Wdeprecated. This warning is disabled by default for now, pending investigation into how common this situation is. llvm-svn: 183884
* Implement core issue 903: only integer literals with value 0 and prvalues ofRichard Smith2013-06-131-8/+9
| | | | | | type std::nullptr_t are null pointer constants from C++11 onwards. llvm-svn: 183883
* In C++11, promote access declaration diagnostic from warning to error. ThereRichard Smith2013-06-131-2/+4
| | | | | | doesn't seem to be any value in even adding a -W flag for this. llvm-svn: 183882
* Add -Wdeprecated warnings and fixits for things deprecated in C++11:Richard Smith2013-06-132-0/+16
| | | | | | | | | - 'register' storage class - dynamic exception specifications Only the former check is enabled by default for now (the latter might be quite noisy). llvm-svn: 183881
* When copy-initializing a temporary for a reference binding, don't allow use ofRichard Smith2013-06-131-7/+5
| | | | | | explicit constructors. llvm-svn: 183879
* Include the unexpanded packs in the initializer expression when checking aNick Lewycky2013-06-131-1/+2
| | | | | | pack expanded constructor initializer list. Fixes PR16303! llvm-svn: 183878
* Simplify: we don't need any special-case lifetime extension when initializingRichard Smith2013-06-127-62/+36
| | | | | | | declarations of reference type; they're handled by the general case handling of MaterializeTemporaryExpr. llvm-svn: 183875
* Don't suggest putting 'operator new' or 'operator delete' in a namespace to ↵Richard Smith2013-06-121-15/+30
| | | | | | fix a two-phase lookup issue. That's not permitted. llvm-svn: 183874
* PR12086, PR15117Richard Smith2013-06-1223-470/+291
| | | | | | | | | | | | | | | | | | | Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. llvm-svn: 183872
* Move detection of reference members binding to temporaries from building ofRichard Smith2013-06-122-10/+28
| | | | | | | CXXCtorInitializers to the point where we perform the questionable lifetime extension. This exposed a selection of false negatives in the warning. llvm-svn: 183869
* Introducing -Wheader-guard, a warning that checks header guards actually workRichard Trieu2013-06-122-5/+36
| | | | | | | | properly. This warning checks that the #ifndef and #define directives at the beginning of a header refer to the same macro name. Includes a fix-it hint to correct the header guard. llvm-svn: 183867
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-124-11/+8
| | | | llvm-svn: 183861
* Reapply r183721, reverted in r183776, with a fix for a bug in the former (weRichard Smith2013-06-128-276/+315
| | | | | | | | | | | | | | | | | | | | | | | were lacking ExprWithCleanups nodes in some cases where the new approach to lifetime extension needed them). Original commit message: Rework IR emission for lifetime-extended temporaries. Instead of trying to walk into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183859
* Preserve newlines before block comments in static initializers.Alexander Kornienko2013-06-122-2/+2
| | | | | | | | | | | | | | | | Summary: Basically, don't special-case line comments in this regard. And fixed an incorrect test, that relied on the wrong behavior. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D962 llvm-svn: 183851
* Port HTMLDiagnostics to PathV2. No intended functionality change.Benjamin Kramer2013-06-122-36/+23
| | | | llvm-svn: 183849
* Silencing a signed vs unsigned comparison mismatch in MSVC.Aaron Ballman2013-06-121-1/+2
| | | | llvm-svn: 183837
* Fix memory corruption in CStringCheckerPavel Labath2013-06-121-4/+1
| | | | | | | | | | | | | | | Summary: "register" functions for the checker were caching the checker objects in a static variable. This caused problems when the function is called with a different CheckerManager. Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D955 llvm-svn: 183823
* Add support for complex compound assignments where the LHS is a scalar.Eli Friedman2013-06-123-43/+68
| | | | | | Fixes <rdar://problem/11224126> and PR12790. llvm-svn: 183821
* Make va_arg and argument passing to varargs functions work correctly withEli Friedman2013-06-121-14/+35
| | | | | | | | AVX vectors when AVX is turned on. Fixes <rdar://problem/10513611>. llvm-svn: 183813
* Tweak r183791 so we don't print a note without a source location.Eli Friedman2013-06-111-2/+2
| | | | llvm-svn: 183803
* Include Path.h instead of PathV2.h.Rafael Espindola2013-06-115-5/+5
| | | | | | I am about to move PathV2.h to Path.h. llvm-svn: 183795
* Correctly handle designated initializers which modify an array initializedEli Friedman2013-06-111-0/+58
| | | | | | | | | | with a string. This case is sort of tricky because we can't modify the StringLiteral used to represent such initializers. We are forced to decompose the string into individual characters. Fixes <rdar://problem/10465114>. llvm-svn: 183791
* Try to fix the windows build.Rafael Espindola2013-06-111-0/+2
| | | | llvm-svn: 183783
* Include PathV1.h in files that use it.Rafael Espindola2013-06-116-0/+6
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
* Revert r183721. It caused cleanups to be delayed too long in some cases.Richard Smith2013-06-116-301/+270
| | | | | | Testcase to follow. llvm-svn: 183776
* Reduce the number of symbols on the object file.Samuel Benzaquen2013-06-111-43/+80
| | | | | | | | | | | | | | | | | Summary: Some compilers where failing with this file because the number of symbols was above 2**15. - Replace std::list<> and std::vector<> with plain arrays. - Change VariadicMatcherCreateCallback to be a function template, and a single class that wraps the instantiations. - Remove some more unnecessary template arguments and function calls. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D948 llvm-svn: 183768
* Modify a comment to reflect changes of r183717.Argyrios Kyrtzidis2013-06-111-2/+2
| | | | llvm-svn: 183751
* Insert a space at the start of a line comment in case it starts with an ↵Alexander Kornienko2013-06-114-44/+84
| | | | | | | | | | | | | | | | | | | | alphanumeric character. Summary: "//Test" becomes "// Test". This change is aimed to improve code readability and conformance to certain coding styles. If a comment starts with a non-alphanumeric character, the space isn't added, e.g. "//-*-c++-*-" stays unchanged. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D949 llvm-svn: 183750
* Silence GCC warning.Benjamin Kramer2013-06-111-0/+1
| | | | llvm-svn: 183742
* ASTUnit: Invert the dependency of PrecompilePreambleAction on ↵Benjamin Kramer2013-06-111-40/+43
| | | | | | | | PrecompilePreambleConsumer. Actions outlive consumers. PR16295. Found by AddressSanitizer. llvm-svn: 183741
* Remove some unicode that sneaked in.David Majnemer2013-06-111-1/+1
| | | | llvm-svn: 183725
* Implement DR61: Address of ambiguous bound methods should be disallowedDavid Majnemer2013-06-111-1/+9
| | | | | | | DR61 affirms that expressions containing unresolved member access should be disallowed when performing "address of" operations. llvm-svn: 183723
* Implement DR85: Redeclaration of member is forbiddenDavid Majnemer2013-06-111-0/+10
| | | | | | | Disallow the existence of a declaration of a member class that isn't a forward declaration before it's definition. llvm-svn: 183722
* Rework IR emission for lifetime-extended temporaries. Instead of trying to walkRichard Smith2013-06-116-270/+300
| | | | | | | | | | | | | | | | | into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183721
* Fix a very silly mistake in r183590.Eli Friedman2013-06-111-1/+0
| | | | llvm-svn: 183720
* Fix a FIXME in a testcase about packed structs and calls I left aroundEli Friedman2013-06-111-1/+10
| | | | | | | | | while fixing a related bug. The fix here was simpler than I thought it would be. Fixes <rdar://problem/10530444>. llvm-svn: 183718
* [libclang] Allow building a precompiled preamble with compiler errorsArgyrios Kyrtzidis2013-06-113-14/+35
| | | | | | | | | | | A while ago we allowed libclang to build a PCH that had compiler errors; this was to retain the performance afforded by a PCH even if the user's code is in an intermediate state. Extend this for the precompiled preamble as well. rdar://14109828 llvm-svn: 183717
* Objective-C [qoi]: Issue better warning when nsstring literal is missingFariborz Jahanian2013-06-101-2/+7
| | | | | | the '@'. PR16287 and // rdar://14106083 llvm-svn: 183713
* Make sure we don't emit invalid IR for StmtExprs with complex cleanups.Eli Friedman2013-06-104-18/+36
| | | | | | Fixes <rdar://problem/14074868>. llvm-svn: 183699
OpenPOWER on IntegriCloud