aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-21Reverting r182337, which merged r182266, __declspec(selectany)Reid Kleckner
Was "Implement __declspec(selectany) under -fms-extensions ..." git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r181283:Bill Wendling
------------------------------------------------------------------------ r181283 | rsmith | 2013-05-06 19:55:48 -0700 (Mon, 06 May 2013) | 6 lines C++ status: - fix paper links to point to isocpp.org, where most of the papers are already up - update "SVN" features to "Clang 3.3" to distinguish them from features which we complete after the branch - document use of -std=c++1y to enable c++1y support ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182341 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r181342:Bill Wendling
------------------------------------------------------------------------ r181342 | rsmith | 2013-05-07 12:32:56 -0700 (Tue, 07 May 2013) | 4 lines C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support. Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from the C++ features study group), and update documentation to match. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182340 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r181487:Bill Wendling
------------------------------------------------------------------------ r181487 | fjahanian | 2013-05-08 16:38:56 -0700 (Wed, 08 May 2013) | 4 lines put noisy "unknown command tag name" warning under -Wdocumentation-unknown-command and off by default. patch by Dmitri Gribenko. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182338 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r182266:Bill Wendling
------------------------------------------------------------------------ r182266 | rnk | 2013-05-20 07:02:37 -0700 (Mon, 20 May 2013) | 13 lines Implement __declspec(selectany) under -fms-extensions selectany only applies to externally visible global variables. It has the effect of making the data weak_odr. The MSDN docs suggest that unused definitions can only be dropped at linktime, so Clang uses weak instead of linkonce. MSVC optimizes away references to constant selectany data, so it must assume that there is only one definition, hence weak_odr. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D814 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182337 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17Merging r182072:Bill Wendling
------------------------------------------------------------------------ r182072 | rsmith | 2013-05-16 19:19:35 -0700 (Thu, 16 May 2013) | 6 lines PR15757: When we instantiate an inheriting constructor template, also instantiate the inherited constructor template and mark that as the constructor which the instantiated specialization is inheriting. This fixes a crash-on-valid when trying to compute the exception specification of a specialization of the inheriting constructor. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182150 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16Merging r181465:Bill Wendling
------------------------------------------------------------------------ r181465 | rsmith | 2013-05-08 13:32:14 -0700 (Wed, 08 May 2013) | 2 lines Add missing triple to unit test. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182037 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15Merging r181909:Bill Wendling
------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15Merging r181750:Bill Wendling
------------------------------------------------------------------------ r181750 | rafael | 2013-05-13 17:44:24 -0700 (Mon, 13 May 2013) | 4 lines Use atomic instructions on linux thumb v7. This matches gcc's behaviour. The patch also explicitly parses the version so that this keeps working when we add support for v8. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15Merging r181728:Bill Wendling
------------------------------------------------------------------------ r181728 | rafael | 2013-05-13 13:09:47 -0700 (Mon, 13 May 2013) | 6 lines Use atomic instructions on ARM linux. This is safe given how the pre-v6 atomic ops funcions in libgcc are implemented. This fixes pr15429. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181919 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08Merging r181286:Bill Wendling
------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08Merging r181368:Bill Wendling
------------------------------------------------------------------------ r181368 | rsmith | 2013-05-07 14:53:22 -0700 (Tue, 07 May 2013) | 3 lines Don't crash in IRGen if a conditional with 'throw' in one of its branches is used as a branch condition. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181401 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08Merging r181299:Bill Wendling
------------------------------------------------------------------------ r181299 | djasper | 2013-05-07 02:25:29 -0700 (Tue, 07 May 2013) | 5 lines Fix clang-format emacs integration in last line. Emacs seems to have a line that is just past the last character of the buffers content. This needs to be handled specially so that clang-format is not called with an invalid -offset. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07Creating release_33 branchBill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181274 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06DebugInfo: Support imported modules (using directives) within lexical blocks.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181272 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06[analyzer; alternate arrows] don't increment the path iterator when we just ↵Ted Kremenek
deleted the next iterator. This is an optimization. It is possible that by deleting the next edge we will pattern match again at the current spot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181256 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Grab-bag of bit-field fixes:John McCall
- References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Add missing initialization for Sema::CurScope. This is important for AST ↵Richard Smith
consumers which don't create a Parser. Pointed out by Tom Honermann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Move PragmaCommentHandler to lib/Parse in preparation for calling SemaReid Kleckner
Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181246 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Modify ASTReaderListener to allow visiting the input files of an AST file.Argyrios Kyrtzidis
We can pass such an input-file-visiting ASTReaderListener to ASTReader::readASTFileControlBlock. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Have the RecursiveASTVisitor traverse the type source info of an objc class ↵Argyrios Kyrtzidis
message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06[analyzer] Remove now-unused bindCompoundLiteral helper function.Jordan Rose
The one user has been changed to use getLValue on the compound literal expression and then use the normal bindLoc to assign a value. No need to special case this in the StoreManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06[analyzer] Handle CXXTemporaryObjectExprs in compound literals.Jordan Rose
This occurs because in C++11 the compound literal syntax can trigger a constructor call via list-initialization. That is, "Point{x, y}" and "(Point){x, y}" end up being equivalent. If this occurs, the inner CXXConstructExpr will have already handled the object construction; the CompoundLiteralExpr just needs to propagate that value forwards. <rdar://problem/13804098> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Fix representation of compound literals for C++ objects with destructors.Jordan Rose
Previously, this compound literal expression (a GNU extension in C++): (AggregateWithDtor){1, 2} resulted in this AST: `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...]) `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the CompoundLiteralExpr, not an object in its own right. By introducing a new entity initialization kind in Sema specifically for compound literals, we avoid the treatment of the inner InitListExpr as a temporary. `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Add SystemZ supportUlrich Weigand
This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Allow targets to define minimum alignment for global variablesUlrich Weigand
This patch adds a new common code feature that allows platform code to request minimum alignment of global symbols. The background for this is that on SystemZ, the most efficient way to load addresses of global symbol is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction provides PC-relative addressing, but only to *even* addresses. For this reason, existing compilers will guarantee that global symbols are always aligned to at least 2. [ Since symbols would otherwise already use a default alignment based on their type, this will usually only affect global objects of character type or character arrays. ] GCC also allows creating symbols without that extra alignment by using explicit "aligned" attributes (which then need to be used on both definition and each use of the symbol). To enable support for this with Clang, this patch adds a TargetInfo::MinGlobalAlign variable that provides a global minimum for the alignment of every global object (unless overridden via explicit alignment attribute), and adds code to respect this setting. Within this patch, no platform actually sets the value to anything but the default 1, resulting in no change in behaviour on any existing target. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181210 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06R600: Update GPU variants in -mcpu optionTom Stellard
We've added the RS880 variant in the LLVM backend to represent an R600 GPU with no vertex cache, so we need to update the GPU mappings for -mcpu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181202 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Remove forward slashes from check; should unbreak Windows buildbots.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Add llvm_unreachable at end of fully covered switchHans Wennborg
To pacify GCC warning about control reaching end of non-void function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181197 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Added Mozilla style, cleaned get*Style methods.Alexander Kornienko
Summary: Patch based on a patch by Ehsan Akhgari. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D750 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Don't break comments after includes.Daniel Jasper
LLVM/Clang basically don't use such comments and for Google-style, include-lines are explicitly exempt from the column limit. Also, for most cases, where the column limit is violated, the "better" solution would be to move the comment to before the include, which clang-format cannot do (yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181191 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Change indentation when breaking after a type.Daniel Jasper
clang-format did not indent any declarations/definitions when breaking after the type. With this change, it indents for all declarations but does not indent for function definitions, i.e.: Before: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } After: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } While it might seem inconsistent to indent function declarations, but not definitions, there are two reasons for that: - Function declarations are very similar to declarations of function type variables, so there is another side to consistency to consider. - There can be many function declarations on subsequent lines and not indenting can make them harder to identify. Function definitions are already separated by their body and not indenting makes the function name slighly easier to find. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181187 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Require the containing type to be complete when we seeJohn McCall
__alignof__ of a field. This problem can only happen in C++11. Also do some petty optimizations. rdar://13784901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181185 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06C++1y: support range-based for loops in constant expressions.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181184 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Break the class-inheritance ":" to the new line.Daniel Jasper
This seems to be more common in LLVM, Google and Chromium. Before: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; After: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181183 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Don't put a space before ellipsis.Daniel Jasper
Before: template <class ... Ts> void Foo(Ts ... ts) { Foo(ts ...); } After: template <class... Ts> void Foo(Ts... ts) { Foo(ts...); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06C++1y: support 'for', 'while', and 'do ... while' in constant expressions.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Fix assert if __extension__ or _Generic is used when initializing a char ↵Richard Smith
array from a string literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05C++1y: support for increment and decrement in constant expression evaluation.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181173 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Factor out duplication between lvalue-to-rvalue conversions and variableRichard Smith
assignments in constant expressions. No significant functionality changes (slight improvement to potential constant expression checking). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181170 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Replace 'MultiExprArg()' with 'None'Dmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Make all 'is in extern "C"' tests use the lexical context.Rafael Espindola
I was not able to find a case (other than the fix in r181163) where this makes a difference, but it is a more obviously correct API to have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05ArrayRef'ize Sema::CheckObjCMethodCallDmitri Gribenko
Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Use lexical contexts when checking for conflicting language linkages.Rafael Espindola
This fixes pr14958. I will audit other calls to isExternCContext to see if there are any similar bugs left. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181163 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Handle parens properly when initializing a char array from a string literal.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181159 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05ArrayRef'ization of some methods in SemaOverload. Patch by Robert Wilhelm!Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181158 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Use remove_if to erase parts of a vector. Avoids O(n^2) worst cases.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181150 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05ArrayRef<T>() -> None cleanupDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181140 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef ↵Dmitri Gribenko
constructor from None Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Properly parsing __declspec(safebuffers), though there is no semantic ↵Aaron Ballman
hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181123 91177308-0d34-0410-b5e6-96231b3b80d8