- Aug 22, 2013
-
-
Faisal Vali authored
Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!* llvm-svn: 188979
-
Shankar Easwaran authored
llvm-svn: 188978
-
Faisal Vali authored
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
-
Hans Wennborg authored
Since it's an llvm-internal tool, we shouldn't install it. llvm-svn: 188976
-
Larisse Voufo authored
llvm-svn: 188975
-
Larisse Voufo authored
llvm-svn: 188974
-
Virgile Bello authored
llvm-svn: 188973
-
Virgile Bello authored
llvm-svn: 188972
-
Bill Wendling authored
llvm-svn: 188971
-
Eli Friedman authored
llvm-svn: 188970
-
Larisse Voufo authored
Improve support for static data member templates. This revision still has at least one bug, as it does not respect the variable template specialization hierarchy well. llvm-svn: 188969
-
Eli Friedman authored
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
-
Jim Grosbach authored
Indirect tail-calls shouldn't use R9 for the branch destination, as it's not reliably a call-clobbered register. rdar://14793425 llvm-svn: 188967
-
Shankar Easwaran authored
llvm-svn: 188965
-
Howard Hinnant authored
XFAIL 3 tests on darwin 11-12. The tests have recently been modified, are correct, and pass with an updated libc++.dylib llvm-svn: 188964
-
Shankar Easwaran authored
llvm-svn: 188963
-
David Blaikie authored
llvm-svn: 188962
-
Shankar Easwaran authored
llvm-svn: 188961
-
Daniel Dunbar authored
llvm-svn: 188960
-
Eli Friedman authored
No intended functionality change. llvm-svn: 188959
-
Shankar Easwaran authored
llvm-svn: 188958
-
Michael Gottesman authored
llvm-svn: 188957
-
Michael Gottesman authored
llvm-svn: 188956
-
Andrew Kaylor authored
llvm-svn: 188955
-
Andrew Kaylor authored
llvm-svn: 188954
-
Tom Stellard authored
When truncated vector stores were being custom lowered in VectorLegalizer::LegalizeOp(), the old (illegal) and new (legal) node pair was not being added to LegalizedNodes list. Instead of the legalized result being passed to VectorLegalizer::TranslateLegalizeResult(), the result was being passed back into VectorLegalizer::LegalizeOp(), which ended up adding a (new, new) pair to the list instead. This was causing an assertion failure when a custom lowered truncated vector store was the last instruction a basic block and the VectorLegalizer was unable to find it in the LegalizedNodes list when updating the DAG root. llvm-svn: 188953
-
Andrew Kaylor authored
llvm-svn: 188952
-
Daniel Dunbar authored
llvm-svn: 188951
-
Daniel Dunbar authored
llvm-svn: 188950
-
Daniel Dunbar authored
llvm-svn: 188949
-
Daniel Dunbar authored
llvm-svn: 188948
-
Daniel Dunbar authored
llvm-svn: 188947
-
Daniel Dunbar authored
llvm-svn: 188946
-
Daniel Dunbar authored
llvm-svn: 188945
-
Manman Ren authored
This will make it easier to turn on struct-path aware TBAA since the metadata format will change. llvm-svn: 188944
-
Andrew Kaylor authored
llvm-svn: 188943
-
Tom Stellard authored
Spotted by Bill Wendling. llvm-svn: 188942
-
Yunzhong Gao authored
Replace "(255 & value)" with "(0xFF & value)" to improve clarity. llvm-svn: 188941
-
Aaron Ballman authored
Patch thanks to Christian Wailes! llvm-svn: 188940
-
- Aug 21, 2013
-
-
Rafael Espindola authored
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
-