summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor VariantMatcher to use an interface underneath.Samuel Benzaquen2013-08-222-78/+135
| | | | | | | | | | | | | | Summary: Refactor VariantMatcher to use an interface underneath. It supports "Single" and "Polymorphic". Will support more in the future. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1446 llvm-svn: 189032
* Re-add clang-check to the Makefile build.Jordan Rose2013-08-221-0/+4
| | | | | | I was bound to screw this up somehow. llvm-svn: 189029
* Work around unused variable warning in release builds.Daniel Jasper2013-08-221-0/+1
| | | | llvm-svn: 189028
* Fix dependencies now that the ARC migrator depends on the static analyzer.Jordan Rose2013-08-227-22/+43
| | | | | | | | | | Thanks for pointing this out, Stephen. I think this is right now -- I attempted to try all four valid combinations with both the autoconf and CMake builds. See also LLVM changes to the configure script. llvm-svn: 189027
* DebugInfo: emit the definition of types when construction vtables are ↵David Blaikie2013-08-222-5/+15
| | | | | | | | | | required as these types may never end up emitting the full class data This might be able to be optimized further by only doing this in the absence of a key function, but it doesn't look like GCC is doing that so I'm not rushing to do it just yet. llvm-svn: 189022
* clang-format: Add column layout formatting for braced listsDaniel Jasper2013-08-228-34/+354
| | | | | | | | | | | | | | | | | | | | With this patch, braced lists (with more than 3 elements are formatted in a column layout if possible). E.g.: static const uint16_t CallerSavedRegs64Bit[] = { X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI, X86::R8, X86::R9, X86::R10, X86::R11, 0 }; Required other changes: - FormatTokens can now have a special role that contains extra data and can do special formattings. A comma separated list is currently the only implementation. - Move penalty calculation entirely into ContinuationIndenter (there was a last piece still in UnwrappedLineFormatter). Review: http://llvm-reviews.chandlerc.com/D1457 llvm-svn: 189018
* DebugInfo: Remove explicit declaration-emissiong handling now that we have a ↵David Blaikie2013-08-222-42/+32
| | | | | | | | more principled approach (the 'requires complete type' callback) No functionality change intended. llvm-svn: 189013
* Revert "Implement a rudimentary form of generic lambdas."Manuel Klimek2013-08-2236-931/+150
| | | | | | This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7. llvm-svn: 189004
* Revert "Remove some unused variables identified by Juergen Ributzka *I need ↵Manuel Klimek2013-08-222-0/+2
| | | | | | | | to turn on this warning in Visual C++ - sorry!*" This reverts commit d01d0b63d87ac465f15ce1d6b56bf3faf4525769. llvm-svn: 189003
* Typo.David Majnemer2013-08-221-2/+2
| | | | llvm-svn: 188996
* const'ify Sema::ActOnCXXTryBlock byRobert Wilhelm2013-08-224-14/+9
| | | | | | | | changing Parameter from MutableArrayRef to ArrayRef. No functionality change intended. llvm-svn: 188994
* gnu-flags.c test: relax the check a bitDmitri Gribenko2013-08-221-7/+1
| | | | | | | This tests warning flags, so no need to test for specific alignment which is platform-dependent. llvm-svn: 188993
* Analysis: Make %I in printf more reasonable, add more testsDavid Majnemer2013-08-222-5/+22
| | | | llvm-svn: 188992
* Constify more uses of ASTContext&. No functional change.Craig Topper2013-08-226-134/+135
| | | | llvm-svn: 188991
* Constify some more ASTContext& uses.Craig Topper2013-08-223-21/+22
| | | | llvm-svn: 188989
* Constify the ASTContext& passed to Stmt creation functions. Also constify ↵Craig Topper2013-08-225-84/+75
| | | | | | the context in couple other functions that are called from creation functions. llvm-svn: 188986
* Constify the ASTContext& passed to Expr creation functions. Also constify ↵Craig Topper2013-08-225-36/+37
| | | | | | the context in couple other functions that are called from creation functions. llvm-svn: 188985
* Add test cases for avx512 feature flags. Fix typo in avx512pf options.Craig Topper2013-08-222-3/+76
| | | | llvm-svn: 188984
* Remove some unused variables identified by Juergen Ributzka *I need to turn ↵Faisal Vali2013-08-222-2/+0
| | | | | | on this warning in Visual C++ - sorry!* llvm-svn: 188979
* Implement a rudimentary form of generic lambdas.Faisal Vali2013-08-2236-150/+931
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, the following features are not included in this commit: - any sort of capturing within generic lambdas - nested lambdas - conversion operator for captureless lambdas - ensuring all visitors are generic lambda aware As an example of what compiles: template <class F1, class F2> struct overload : F1, F2 { using F1::operator(); using F2::operator(); overload(F1 f1, F2 f2) : F1(f1), F2(f2) { } }; auto Recursive = [](auto Self, auto h, auto ... rest) { return 1 + Self(Self, rest...); }; auto Base = [](auto Self, auto h) { return 1; }; overload<decltype(Base), decltype(Recursive)> O(Base, Recursive); int num_params = O(O, 5, 3, "abc", 3.14, 'a'); Please see attached tests for more examples. Some implementation notes: - Add a new Declarator context => LambdaExprParameterContext to clang::Declarator to allow the use of 'auto' in declaring generic lambda parameters - Augment AutoType's constructor (similar to how variadic template-type-parameters ala TemplateTypeParmDecl are implemented) to accept an IsParameterPack to encode a generic lambda parameter pack. - Add various helpers to CXXRecordDecl to facilitate identifying and querying a closure class - LambdaScopeInfo (which maintains the current lambda's Sema state) was augmented to house the current depth of the template being parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth) so that Sema::ActOnLambdaAutoParameter may use it to create the appropriate list of corresponding TemplateTypeParmDecl for each auto parameter identified within the generic lambda (also stored within the current LambdaScopeInfo). Additionally, a TemplateParameterList data-member was added to hold the invented TemplateParameterList AST node which will be much more useful once we teach TreeTransform how to transform generic lambdas. - SemaLambda.h was added to hold some common lambda utility functions (this file is likely to grow ...) - Teach Sema::ActOnStartOfFunctionDef to check whether it is being called to instantiate a generic lambda's call operator, and if so, push an appropriately prepared LambdaScopeInfo object on the stack. - Teach Sema::ActOnStartOfLambdaDefinition to set the return type of a lambda without a trailing return type to 'auto' in C++1y mode, and teach the return type deduction machinery in SemaStmt.cpp to process either C++11 and C++14 lambda's correctly depending on the flag. - various tests were added - but much more will be needed. A greatful thanks to all reviewers including Eli Friedman, James Dennett and the ever illuminating Richard Smith. And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified! Thanks! llvm-svn: 188977
* Add a constexpr functionality test for static data member templates.Larisse Voufo2013-08-221-0/+19
| | | | llvm-svn: 188975
* Refactor for clarity and simplicity.Larisse Voufo2013-08-228-152/+143
| | | | llvm-svn: 188974
* Improve support for static data member templates. This revision still has at ↵Larisse Voufo2013-08-224-36/+78
| | | | | | least one bug, as it does not respect the variable template specialization hierarchy well. llvm-svn: 188969
* Split isFromMainFile into two functions.Eli Friedman2013-08-2219-24/+66
| | | | | | | | | Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). llvm-svn: 188968
* DebugInfo: Require only the declaration of types only used as parameter and ↵David Blaikie2013-08-212-2/+9
| | | | | | return types llvm-svn: 188962
* Reduce sizeof(TemplateArgument) from 32 to 24.Eli Friedman2013-08-212-47/+62
| | | | | | No intended functionality change. llvm-svn: 188959
* Updated the consumed analysis warnings to use a more standardized diagnostic.Aaron Ballman2013-08-212-11/+8
| | | | | | Patch thanks to Christian Wailes! llvm-svn: 188940
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-219-67/+156
| | | | | | | | | | | | | | | | | | | | | | | The original idea was to implement it all on the driver, but to do that the driver needs to know the sse level and to do that it has to know the default features of a cpu. Benjamin Kramer pointed out that if one day we decide to implement support for ' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to keep its knowledge of default features of a cpu. To avoid duplicating which part of clang handles default cpu features, it is probably better to handle -mfpmath in the frontend. For ARM this patch is just a small improvement. Instead of a cpu list, we check if neon is enabled, which allows us to reject things like -mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon For X86, since LLVM doesn't support an independent ssefp feature, we just make sure the selected -mfpmath matches the sse level. llvm-svn: 188939
* Analysis: Add support for MS specific printf format specifiersDavid Majnemer2013-08-215-7/+96
| | | | | | | | | | | | | | Summary: Adds support for %I, %I32 and %I64. Reviewers: hans, jordan_rose, rnk, majnemer Reviewed By: majnemer CC: cfe-commits, cdavis5x Differential Revision: http://llvm-reviews.chandlerc.com/D1456 llvm-svn: 188937
* Removed unnecessary asserts.Aaron Ballman2013-08-211-38/+0
| | | | | | Patch thanks to Christian Wailes! llvm-svn: 188934
* TBAA: add testing case to check typedef can alias.Manman Ren2013-08-211-0/+14
| | | | llvm-svn: 188931
* Don't use mangleCXXRTTIName in TBAA for C code.Manman Ren2013-08-213-4/+18
| | | | | | | | | | | With r185721, calling mangleCXXRTTIName on C code will cause crashes. This commit fixes crashes on C testing cases when turning on struct-path TBAA. For C code, we simply use the Decl name without the context. This can cause two different structs having the same name, and may cause inaccurate but conservative alias results. llvm-svn: 188930
* Update testing case to use FileCheck instead of grep.Manman Ren2013-08-211-3/+9
| | | | llvm-svn: 188929
* ObjectibeC migrator. Annotate cf_consumed arguments,Fariborz Jahanian2013-08-212-7/+17
| | | | | | as reported by static analyer API with CF_CONSUMED. llvm-svn: 188922
* Fix the end sourcelocation of the call expression in a member access whenNick Lewycky2013-08-212-4/+13
| | | | | | recovering by adding empty parenthesis. Fixes PR16676! llvm-svn: 188920
* Revert r188863 which could propose wrong fixits for multibyte character ↵Nick Lewycky2013-08-212-20/+3
| | | | | | literals. llvm-svn: 188918
* ObjectiveC migrator: until we have beter understanding ofFariborz Jahanian2013-08-212-29/+25
| | | | | | | setter/getter implementations, migrate them to nonatomic properties. llvm-svn: 188914
* Remove dead code.Rafael Espindola2013-08-211-10/+0
| | | | | | | setFeatureEnabled is never called with "32" or "64". The driver never passes it and mips' getDefaultFeatures sets the Features map directly. llvm-svn: 188913
* Move the logic for selecting the last feature in the command line to the driver.Rafael Espindola2013-08-213-21/+21
| | | | | | | This is a partial revert of r188817 now that the driver handles -target-feature in a single place. llvm-svn: 188910
* [CGF] Get rid of passing redundant VTable pointer around in ↵Timur Iskhodzhanov2013-08-212-11/+4
| | | | | | CodeGenFunction::InitializeVTablePointer[s] llvm-svn: 188909
* Centralize the handling of -target-feature.Rafael Espindola2013-08-214-196/+188
| | | | | | | No functionality change other than changing the order of -target-feature relative to other -cc1 command line arguments. llvm-svn: 188906
* Tweak gnu-flags.c test for z, where globals have 2-byte alignment by defaultRichard Sandiford2013-08-211-1/+7
| | | | llvm-svn: 188905
* Don't disable SSE4A when disabling AVX.Rafael Espindola2013-08-212-1/+14
| | | | | | Thanks for Craig Topper for noticing it. llvm-svn: 188902
* Sema: Use the right type for PredefinedExpr when it's in a lambda.Benjamin Kramer2013-08-214-17/+75
| | | | | | | | | | | | | 1. We now print the return type of lambdas and return type deduced functions as "auto". Trailing return types with decltype print the underlying type. 2. Use the lambda or block scope for the PredefinedExpr type instead of the parent function. This fixes PR16946, a strange mismatch between type of the expression and the actual result. 3. Verify the type in CodeGen. 4. The type for blocks is still wrong. They are numbered and the name is not known until CodeGen. llvm-svn: 188900
* clang-format: Indent relative to unary operators.Daniel Jasper2013-08-214-12/+21
| | | | | | | | | | | | | | | | Before: if (!aaaaaaaaaa( // break aaaaa)) { } After: if (!aaaaaaaaaa( // break aaaaa)) { } Also cleaned up formatting using clang-format. llvm-svn: 188891
* Abstract out virtual calls and virtual function prologue code generation; ↵Timur Iskhodzhanov2013-08-2115-50/+447
| | | | | | implement them for -cxx-abi microsoft llvm-svn: 188870
* Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.Craig Topper2013-08-213-6/+52
| | | | llvm-svn: 188867
* Issue fixits replacing invalid character literals with the equivalent \xNNNick Lewycky2013-08-212-3/+20
| | | | | | escape code. llvm-svn: 188863
* Revert accidental commit.Craig Topper2013-08-211-56/+59
| | | | llvm-svn: 188862
* Revert accidental commit.Craig Topper2013-08-214-40/+41
| | | | llvm-svn: 188861
OpenPOWER on IntegriCloud