aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Stmt.h
AgeCommit message (Collapse)Author
2013-10-20Miscellaneous speling fixes.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22Constify some more ASTContext& uses.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188989 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22Constify the ASTContext& passed to Stmt creation functions. Also constify ↵Craig Topper
the context in couple other functions that are called from creation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21Revert accidental commit.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21Replace avx-512 with avx512f to match llvm side and what gcc patches appear ↵Craig Topper
to be using. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188860 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-20Revert r188756 because some other changes snuck in with it.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188757 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-20Add AVX-512 feature flag and knl cpu to clang.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-19Make the version of Stmt::operator new that takes ASTContext* call the ↵Craig Topper
ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188648 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-18Revert r188644 to unbreak buildbots.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188645 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-18Remove Stmt::operator new that takes a ASTContext*. All callers use the ↵Craig Topper
ASTContext& version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188644 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-18Remove throw() from Stmt::operator new so the compiler will omit the null ↵Craig Topper
check on the result since ASTContext allocator won't return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188641 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-18Make expression allocation methods use a 'const' reference to the ASTContext ↵Craig Topper
since the underlying operator new only needs a const reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27Delete dead code.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185101 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12PR12086, PR15117Richard Smith
Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05Model temporary lifetime-extension explicitly in the AST. Use this model toRichard Smith
handle temporaries which have been lifetime-extended to static storage duration within constant expressions. This correctly handles nested lifetime extension (through reference members of aggregates in aggregate initializers) but non-constant-expression emission hasn't yet been updated to do the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-12C++1y: support for 'switch' statements in constexpr functions. This is somewhatRichard Smith
inefficient; we perform a linear scan of switch labels to find the one matching the condition, and then walk the body looking for that label. Both parts should be straightforward to optimize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181671 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Implement template support for CapturedStmtWei Pan
- Sema tests added and CodeGen tests are pending Differential Revision: http://llvm-reviews.chandlerc.com/D728 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Serialization for captured statementsBen Langmuir
Add serialization for captured statements and captured decls. Also add a const_capture_iterator to CapturedStmt. Test contributed by Wei Pan Differential Revision: http://llvm-reviews.chandlerc.com/D727 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Move parsing of identifiers in MS-style inline assembly intoJohn McCall
the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29Small CapturedStmt improvementsBen Langmuir
Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get to the CapturedRegionKind enum. This also allows codegen to access this enum without including Sema/ScopeInfo.h. Also removes some duplicated code for capturing 'this' between CapturedStmt and Lambda. Differential Revision: http://llvm-reviews.chandlerc.com/D712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180710 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Sema for Captured StatementsTareq A. Siraj
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Implement CapturedStmt ASTTareq A. Siraj
CapturedStmt can be used to implement generic function outlining as described in http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. CapturedStmt is not exposed to the C api. Serialization and template support are pending. Author: Wei Pan <wei.pan@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D370 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-23Remove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.Enea Zaffanella
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175963 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26Highlight various parts of the AST dump with color. Colors are controlled byRichard Trieu
-f(no-)color-diagnostics. In addition, dumpColor() function calls are added to force color printing. No structural changes to -ast-dump. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22Switch to APFloat constructor taking fltSemantics.Tim Northover
This change also makes the serialisation store the required semantics, fixing an issue where PPC128 was always assumed when re-reading a 128-bit value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko
brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04Move the common source locations of CastStmt & DefaultStmt into their base ↵Argyrios Kyrtzidis
class, SwitchCase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29ArrayRefize a CompoundStmt constructor.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171238 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-25Fix for PR12222.Erik Verbruggen
Changed getLocStart() and getLocEnd() to be required for Stmts, and make getSourceRange() optional. The default implementation for getSourceRange() is build the range by calling getLocStart() and getLocEnd(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171067 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01Include pruning and general cleanup.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer
pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16StmtDumper: remove incomplete support for limiting the maximum dump depth.Dmitri Gribenko
There are better ways of limiting the amount of information if there is a need for that. Patch by Philip Craig. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16[ms-inline asm] Move some logic around to simplify the interface between theChad Rosier
front-end and the AsmParser. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166063 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11Remove pointless classof()'s.Sean Silva
Updates to llvm/Support/Casting.h have rendered these classof()'s irrelevant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04Revert r163083 per chandlerc's request.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[ms-inline asm] Add constraints to MSAsmStmt. We don't currently computeChad Rosier
the constraints, so in the interim we speculatively assume a 'r' constraint. This is expected to work for most cases on x86. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162784 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[ms-inline asm] Make the AsmStmt class non-virtual.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162768 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[ms-inline asm] Hoist more common code into the AsmStmt base class. Add stubsChad Rosier
with FIXMEs for unimplemented features. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Add virtual function, getClobber, that returns a StringRef.Chad Rosier
More work towards unifying asm stmt codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162712 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Hoist getNumClobbers into base class.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162711 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Rename getClobber to getClobberStringLiteral. No functionalChad Rosier
change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27Appease -Wnon-virtual-dtorMatt Beaumont-Gay
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162700 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Add a few comments.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162699 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Hoist common Expr handling logic into AsmStmt.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162698 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Rename GenerateAsmString to generateAsmString to conform withChad Rosier
coding standards. Also, add stub for MSAsmStmt class as part of unifying codegen logic for AsmStmts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162696 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Base class AsmStmt implements these.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162693 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Hoist common logic into the AsmStmt base class.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162692 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Add a new base class, AsmStmt, for the GCCAsmStmt and MSAsmStmtChad Rosier
classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27Update comment, per Jordan's suggestion.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162684 91177308-0d34-0410-b5e6-96231b3b80d8