summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64Timur Iskhodzhanov2013-08-261-0/+5
| | | | llvm-svn: 189214
* Teach the Linux toolchain about more modern Gentoo installations of GCCChandler Carruth2013-08-267-0/+29
| | | | | | | | which add another wrinkle to the installation of the libstdc++ headers. Add at least some basic testing of the weirdnesses of Gentoo's layout. llvm-svn: 189212
* DebugInfo: Emit info for casted decls in template argsDavid Majnemer2013-08-251-1/+19
| | | | | | | | | | | | | | | | | | Summary: Previously the backend wouldn't get to see the underlying GlobalValue that corresponds to the template argument because it would be hidden by a cast at the IR level. Instead strip the pointer casts off of the value until we see the underlying GlobalValue. Reviewers: dblaikie, echristo, majnemer Reviewed By: majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1508 llvm-svn: 189200
* Produce an error when trying to link with -emit-llvm.Rafael Espindola2013-08-251-0/+2
| | | | llvm-svn: 189193
* Tests for ARM aligned access + reserved R9Renato Golin2013-08-252-0/+13
| | | | | | Patch by Jeroen Hofstee. llvm-svn: 189190
* Fix test, make the template type a const pointer.David Majnemer2013-08-241-1/+1
| | | | llvm-svn: 189166
* DebugInfo: Emit info for constant expressions in template argumentsDavid Majnemer2013-08-241-1/+15
| | | | | | | | | | | | | | | | | | | Summary: This allows us to handle the general case where a non-type template argument evaluates to a constant expression which isn't integral or a declaration. This fixes PR16939. Reviewers: dblaikie, rsmith Reviewed By: dblaikie CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1453 llvm-svn: 189165
* Don't imply -flto with -O4.Rafael Espindola2013-08-233-14/+4
| | | | | | We now saturate at -O3. llvm-svn: 189149
* Consumed analysis: change class name in test cases.DeLesley Hutchins2013-08-232-55/+55
| | | | | | | The name of a class used in the testing files was updated to actually be descriptive. Patch by chris.wailes@gmail.com. llvm-svn: 189132
* Comment parsing: fix a bug where a line with whitespace between two paragraphsDmitri Gribenko2013-08-232-6/+6
| | | | | | | | | | would cause us to concatenate these paragraphs into a single one. The no-op whitespace churn in test/Index test happened because these tests don't use the correct approach for testing and are more strict than required for they are testing. llvm-svn: 189126
* Revise -Wnewline-eof test per feedback from Dmitri.Jordan Rose2013-08-231-6/+6
| | | | llvm-svn: 189113
* Respect -Wnewline-eof even in C++11 mode.Jordan Rose2013-08-233-8/+10
| | | | | | | | | | | If the user has requested this warning, we should emit it, even if it's not an extension in the current language mode. However, being an extension is more important, so prefer the pedantic warning or the pedantic-compatibility warning if those are enabled. <rdar://problem/12922063> llvm-svn: 189110
* correct test RUN parametersRobert Lytton2013-08-231-4/+2
| | | | llvm-svn: 189093
* [analyzer] Refactor conditional expression evaluating codePavel Labath2013-08-231-0/+12
| | | | | | | | | | | | | | | | | | | Summary: Instead of digging through the ExplodedGraph, to figure out which edge brought us here, I compute the value of conditional expression by looking at the sub-expression values. To do this, I needed to change the liveness algorithm a bit -- now, the full conditional expression also depends on all atomic sub-expressions, not only the outermost ones. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1340 llvm-svn: 189090
* Sema: Properly support Microsoft-mode template argumentsDavid Majnemer2013-08-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: There were two things known to be wrong with our implementation of MSVC mode template arguments: - We didn't properly handle __uuidof/CXXUuidofExpr and skipped all type checking completely. - We didn't allow for MSVC's extension of allowing certain constant "foldable" expressions from showing up in template arguments. They allow various casts dereference and address-of operations. We can make it more general as we find further peculiarities but this is the known extent. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: doug.gregor CC: cfe-commits, rnk Differential Revision: http://llvm-reviews.chandlerc.com/D1444 llvm-svn: 189087
* Reword a diagnostic to avoid a confusing implication that it might be talkingRichard Smith2013-08-232-2/+2
| | | | | | about a declaration within a return type. llvm-svn: 189083
* ObjectiveC migrator: builtin ObjectiveC types are notFariborz Jahanian2013-08-222-0/+14
| | | | | | audited types. llvm-svn: 189072
* Check for absence of the flag.Bill Wendling2013-08-221-1/+1
| | | | llvm-svn: 189069
* Update to consumed analysis.DeLesley Hutchins2013-08-221-0/+23
| | | | | | | | | | | Patch by chris.wailes@gmail.com. The following functionality was added: * The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs. * Factored out some code in StmtVisitor. * Removed variables from the state map when their destructors are encountered. * Started adding documentation for the consumed analysis attributes. llvm-svn: 189059
* Add a separate llvm.global_ctors entry for linkonce_odr data initializersReid Kleckner2013-08-222-2/+30
| | | | | | | | | | | | | | | Summary: These typically come from static data members of class template specializations. This accomplishes two things: 1. May expose GlobalOpt optimizations for Itanium C++ ABI code. 2. Works toward fixing double initialization in the Microsoft C++ ABI. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1475 llvm-svn: 189051
* FileCheckify a grep test.Reid Kleckner2013-08-221-3/+5
| | | | llvm-svn: 189042
* ObjectiveC migrator: Provide ARC annotations forFariborz Jahanian2013-08-221-7/+43
| | | | | | CF methods too. llvm-svn: 189041
* DebugInfo: emit the definition of types when construction vtables are ↵David Blaikie2013-08-221-2/+9
| | | | | | | | | | 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
* Revert "Implement a rudimentary form of generic lambdas."Manuel Klimek2013-08-226-342/+2
| | | | | | This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7. llvm-svn: 189004
* Typo.David Majnemer2013-08-221-2/+2
| | | | llvm-svn: 188996
* 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-221-1/+17
| | | | llvm-svn: 188992
* Add test cases for avx512 feature flags. Fix typo in avx512pf options.Craig Topper2013-08-221-1/+74
| | | | llvm-svn: 188984
* Implement a rudimentary form of generic lambdas.Faisal Vali2013-08-226-2/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-222-77/+79
| | | | llvm-svn: 188974
* Improve support for static data member templates. This revision still has at ↵Larisse Voufo2013-08-221-8/+57
| | | | | | 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-223-0/+26
| | | | | | | | | 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-211-0/+7
| | | | | | return types llvm-svn: 188962
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-212-29/+43
| | | | | | | | | | | | | | | | | | | | | | | 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-211-0/+9
| | | | | | | | | | | | | | 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
* 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-212-1/+10
| | | | | | | | | | | 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-211-6/+6
| | | | | | 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-211-0/+10
| | | | | | recovering by adding empty parenthesis. Fixes PR16676! llvm-svn: 188920
* Revert r188863 which could propose wrong fixits for multibyte character ↵Nick Lewycky2013-08-211-11/+0
| | | | | | literals. llvm-svn: 188918
* ObjectiveC migrator: until we have beter understanding ofFariborz Jahanian2013-08-211-14/+14
| | | | | | | setter/getter implementations, migrate them to nonatomic properties. llvm-svn: 188914
* Move the logic for selecting the last feature in the command line to the driver.Rafael Espindola2013-08-211-1/+2
| | | | | | | This is a partial revert of r188817 now that the driver handles -target-feature in a single place. llvm-svn: 188910
* Centralize the handling of -target-feature.Rafael Espindola2013-08-212-10/+10
| | | | | | | 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-211-0/+13
| | | | | | 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-211-0/+40
| | | | | | | | | | | | | 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
* Abstract out virtual calls and virtual function prologue code generation; ↵Timur Iskhodzhanov2013-08-213-9/+224
| | | | | | implement them for -cxx-abi microsoft llvm-svn: 188870
* Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.Craig Topper2013-08-211-0/+6
| | | | llvm-svn: 188867
OpenPOWER on IntegriCloud