summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-211-2/+4
| | | | | | | | | | | | We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 llvm-svn: 211426
* Fix crash caused by unnamed union or struct when doing ast-printSerge Pavlov2014-06-201-3/+5
| | | | llvm-svn: 211380
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-201-0/+4
| | | | llvm-svn: 211352
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-201-0/+4
| | | | llvm-svn: 211347
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-201-0/+10
| | | | llvm-svn: 211342
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-181-0/+5
| | | | | | MSVC). llvm-svn: 211140
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-171-5/+0
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template llvm-svn: 211113
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-171-0/+5
| | | | llvm-svn: 211096
* [OPENMP] Initial support of 'reduction' clauseAlexey Bataev2014-06-161-0/+22
| | | | llvm-svn: 211007
* Adds a Pragma spelling for attributes to tablegen and makes use of it for loopTyler Nowicki2014-06-131-14/+2
| | | | | | | | | hint attributes. Includes tests for pragma printing and for attribute order which is incorrectly reversed by ParsedAttributes. Reviewed by Aaron Ballman llvm-svn: 210925
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-091-5/+1
| | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. llvm-svn: 210498
* Adding a new #pragma for the vectorize and interleave optimization hints.Aaron Ballman2014-06-061-2/+16
| | | | | | Patch thanks to Tyler Nowicki! llvm-svn: 210330
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-041-0/+8
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-291-0/+12
| | | | llvm-svn: 209816
* Parsing/Sema for OMPCollapseClause.Alexander Musman2014-05-271-0/+6
| | | | | | Actual usage in Sema for collapsing loops will in some future patch. llvm-svn: 209660
* Fix the AST printer for attributed statements so that it does not print ↵Aaron Ballman2014-05-131-13/+2
| | | | | | duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]] llvm-svn: 208706
* [C++11] Use 'nullptr'. AST edition.Craig Topper2014-05-121-11/+11
| | | | llvm-svn: 208517
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-061-0/+6
| | | | | | clause 'proc_bind' llvm-svn: 208060
* [OPENMP] parsing 'linear' clause (for directive 'omp simd')Alexander Musman2014-04-221-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D3272 llvm-svn: 206891
* Add support for MSVC's __FUNCSIG__Reid Kleckner2014-04-081-0/+3
| | | | | | | | | | | It is very similar to GCC's __PRETTY_FUNCTION__, except it prints the calling convention. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D3311 llvm-svn: 205780
* [OPENMP] Implemented 'copyin' clauseAlexey Bataev2014-03-311-3/+17
| | | | llvm-svn: 205164
* [OPENMP] parsing of clause 'safelen' (for directive 'omp simd')Alexey Bataev2014-03-211-0/+6
| | | | llvm-svn: 204428
* [C++11] Replacing CompoundStmt iterators body_begin() and body_end() with ↵Aaron Ballman2014-03-171-3/+2
| | | | | | iterator_range body(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204040
* [C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with ↵Aaron Ballman2014-03-141-5/+1
| | | | | | iterator_range decls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203947
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-071-5/+3
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [OPENMP] Clause 'num_threads'Alexey Bataev2014-03-061-0/+6
| | | | llvm-svn: 203087
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-271-8/+18
| | | | llvm-svn: 202360
* Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."Benjamin Kramer2014-02-251-0/+6
| | | | | | There were many additional tests that had the bad behavior baked in. llvm-svn: 202174
* Revert "Pretty Printer: Fix printing of conversion operator decls and calls."Rafael Espindola2014-02-251-6/+0
| | | | | | | | This reverts commit r202167. It broke Analysis/auto-obj-dtors-cfg-output.cpp llvm-svn: 202173
* Pretty Printer: Fix printing of conversion operator decls and calls.Benjamin Kramer2014-02-251-0/+6
| | | | | | | | | | | | | - Don't emit anything when we encounter a call to a conversion operator. "bar(a & b)" instead of "bar(a & b.operator int())" This preserves the semantics and is still idempotent if we print the AST multiple times. - Properly print declarations of conversion operators. "explicit operator bool();" instead of "bool operator _Bool();" PR18776. llvm-svn: 202167
* [OPENMP] 'if' clause support (no CodeGen support)Alexey Bataev2014-02-131-2/+10
| | | | llvm-svn: 201297
* Fixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing onRichard Trieu2014-02-061-1/+3
| | | | | | certain receiver types. llvm-svn: 200953
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-1/+1
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Fixed a FIXME; created a print method for Selectors that accepts a ↵Aaron Ballman2014-01-031-2/+4
| | | | | | | | raw_ostream, and started using it in places it made sense. No functional changes intended, just API cleanliness. llvm-svn: 198428
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-011-15/+2
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Remove an unused parameter and include after r197273Alp Toker2013-12-131-1/+0
| | | | llvm-svn: 197274
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-131-17/+3
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* Unify type trait parsingAlp Toker2013-12-121-54/+9
| | | | | | | | | | | | | | | | | Type trait parsing is all over the place at the moment with unary, binary and n-ary C++11 type traits that were developed independently at different points in clang's history. There's no good reason to handle them separately -- there are three parsers, three AST nodes and lots of duplicated handling code with slightly different implementations and diags for each kind. This commit unifies parsing of type traits and sets the stage for further consolidation. No change in behaviour other than more consistent error recovery. llvm-svn: 197179
* Add new PrintingPolicy entry to trim number of newlines. Useful for the CFG ↵Ted Kremenek2013-12-111-7/+14
| | | | | | | | | printer. The change isn't completely comprehensive. This can be filled in lazily as needed. There is one consumer right now. llvm-svn: 197093
* Fix code typos spotted while working on type traitsAlp Toker2013-12-061-2/+2
| | | | llvm-svn: 196587
* [-fms-extensions] Add support for __FUNCDNAME__David Majnemer2013-11-061-0/+3
| | | | | | | | | | | | | | | | Summary: Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled function name via __FUNCDNAME__. This implementation is very naive and unoptimized, it is expected that __FUNCDNAME__ would be used rarely in practice. Reviewers: rnk, rsmith, thakis CC: cfe-commits, silvas Differential Revision: http://llvm-reviews.chandlerc.com/D2109 llvm-svn: 194181
* [-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for ↵David Majnemer2013-10-181-0/+1
| | | | | | | | | | | | | | 'final' Summary: Some MS headers use these features. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1948 llvm-svn: 192936
* [OpenMP] Added parsing and semantic analysis for firstprivate clauseAlexey Bataev2013-10-011-0/+8
| | | | llvm-svn: 191730
* Per latest drafting, switch to implementing init-captures as if by declaringRichard Smith2013-09-281-10/+4
| | | | | | and capturing a variable declaration, and complete the implementation of them. llvm-svn: 191605
* AST: Handle qualified array types in typeid() expressionsDavid Majnemer2013-09-271-2/+2
| | | | | | | | | | | | The intent of getTypeOperand() was to yield an unqualified type. However QualType::getUnqualifiedType() does not strip away qualifiers on arrays. N.B. This worked fine when typeid() was applied to an expression because we would inject as implicit cast to the unqualified array type in the AST. llvm-svn: 191487
* [OPENMP] Bug fixes and improvements.Alexey Bataev2013-09-241-8/+12
| | | | | | | | 1. Fixed constructor of shared clause. 2. Some macros for clauses processing are replaced by private template methods. 3. Additional checks in sema analysis of OpenMP clauses. llvm-svn: 191265
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-181-0/+8
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test ↵Alexey Bataev2013-09-061-0/+8
| | | | | | threadprivate_messages.cpp) llvm-svn: 190183
* Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"Rafael Espindola2013-09-031-8/+0
| | | | | | | | This reverts commit r189795. threadprivate_messages.cpp is faling on windows. llvm-svn: 189811
* OpenMP: Data-sharing attributes analysis and clause 'shared'Alexey Bataev2013-09-031-0/+8
| | | | llvm-svn: 189795
OpenPOWER on IntegriCloud