summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/exprs.c
Commit message (Collapse)AuthorAgeFilesLines
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-1/+5
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* C1X: implement generic selectionsPeter Collingbourne2011-04-151-0/+3
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-1/+1
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Modify the way sub-statements are stored and retrieved from PCH.Argyrios Kyrtzidis2010-06-281-0/+2
| | | | | | | | | | | | | | | Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g. x = sizeof(int[1]); would crash PCH. Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs. llvm-svn: 107087
* Completely reimplement __builtin_offsetof, based on a patch by RobertoDouglas Gregor2010-04-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amadini. This change introduces a new expression node type, OffsetOfExpr, that describes __builtin_offsetof. Previously, __builtin_offsetof was implemented using a unary operator whose subexpression involved various synthesized array-subscript and member-reference expressions, which was ugly and made it very hard to instantiate as a template. OffsetOfExpr represents the AST more faithfully, with proper type source information and a more compact representation. OffsetOfExpr also has support for dependent __builtin_offsetof expressions; it can be value-dependent, but will never be type-dependent (like sizeof or alignof). This commit introduces template instantiation for __builtin_offsetof as well. There are two major caveats to this patch: 1) CodeGen cannot handle the case where __builtin_offsetof is not a constant expression, so it produces an error. So, to avoid regressing in C, we retain the old UnaryOperator-based __builtin_offsetof implementation in C while using the shiny new OffsetOfExpr implementation in C++. The old implementation can go away once we have proper CodeGen support for this case, which we expect won't cause much trouble in C++. 2) __builtin_offsetof doesn't work well with non-POD class types, particularly when the designated field is found within a base class. I will address this in a subsequent patch. Fixes PR5880 and a bunch of assertions when building Boost.Python tests. llvm-svn: 102542
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-3/+3
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-2/+2
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* make sure to verify that the "non pch" runs worked.Chris Lattner2009-04-181-1/+1
| | | | llvm-svn: 69457
* PCH support for CompoundLiteralExpr. This is the last C expressionDouglas Gregor2009-04-161-0/+4
| | | | | | | that does not require PCH support for statements. Only AddrLabelExpr, StmtExpr, and BlockExpr remain (for C). llvm-svn: 69255
* PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.Douglas Gregor2009-04-161-0/+8
| | | | llvm-svn: 69251
* PCH support for ShuffleVectorExpr and BlockDeclRefExprDouglas Gregor2009-04-161-0/+3
| | | | llvm-svn: 69244
* PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.Douglas Gregor2009-04-151-0/+9
| | | | llvm-svn: 69242
* PCH support for ExtVectorElementExpr and VAArgExpr.Douglas Gregor2009-04-151-0/+3
| | | | llvm-svn: 69240
* PCH support for CompoundAssignOperator and ConditionalOperatorDouglas Gregor2009-04-151-0/+6
| | | | llvm-svn: 69237
* PCH support for ImaginaryLiteral and ArraySubscriptExprDouglas Gregor2009-04-151-0/+7
| | | | llvm-svn: 69233
* PCH support for MemberExpr and CallExpr.Douglas Gregor2009-04-151-0/+6
| | | | llvm-svn: 69186
* PCH support for string literalsDouglas Gregor2009-04-151-0/+5
| | | | llvm-svn: 69172
* PCH support for UnaryOperator, SizeOfAlignOfExprDouglas Gregor2009-04-151-1/+9
| | | | llvm-svn: 69169
* PCH support for CStyleCastExpr and BinaryOperator expression kinds.Douglas Gregor2009-04-151-1/+7
| | | | llvm-svn: 69119
* Add PCH support for PredefinedExpr and FloatingLiteral expressionsDouglas Gregor2009-04-141-2/+7
| | | | llvm-svn: 69084
* PCH support for a few very, very simple kinds of expressions. Hook upDouglas Gregor2009-04-141-0/+19
expression (de-)serialization for VLAs, variable initializers, enum constant initializers, and bitfield widths. llvm-svn: 69075
OpenPOWER on IntegriCloud