summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParsePragma.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Small CapturedStmt improvementsBen Langmuir2013-04-291-2/+1
| | | | | | | | | | | | | 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 llvm-svn: 180710
* Sema for Captured StatementsTareq A. Siraj2013-04-161-1/+16
| | | | | | | | | | | | | 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 llvm-svn: 179618
* Parser support for #pragma clang __debug capturedTareq A. Siraj2013-04-161-0/+15
| | | | | | | | | | | | | | | This patch implements parsing ‘#pragma clang __debug’ as a first step for implementing captured statements. Captured statements are a mechanism for doing outlining in the AST. see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. Currently returns StmtEmpty Author: Andy Zhang <andy.zhang@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D369 llvm-svn: 179614
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-0/+44
| | | | llvm-svn: 177705
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Permanently end the whole "pragma got handled by the parser too early"Eli Friedman2012-10-041-48/+200
| | | | | | | mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. llvm-svn: 165195
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-2/+2
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Parse: Change PragmaPackHandler to use the preprocessor allocator.Daniel Dunbar2012-02-291-7/+16
| | | | llvm-svn: 151689
* Handle "#pragma GCC visibility" in a few more places. Switch over "#pragma ↵Eli Friedman2012-02-231-2/+32
| | | | | | | | pack" to use the same handling that gcc does. Fixes <rdar://problem/10871094> and <rdar://problem/10893316>. (Hopefully, common usage of these pragmas isn't irregular enough to break our current handling. Doug has ideas for a more crazy approach if necessary.) llvm-svn: 151307
* Implement #pragma redefine_extname.David Chisnall2012-02-181-0/+38
| | | | | | This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. llvm-svn: 150881
* Fix our handling of #pragma GCC visibility.Rafael Espindola2012-01-261-1/+16
| | | | | | | | | | Now the lexer just produces a token and the parser is the one responsible for activating it. This fixes problem like the one pr11797 where the lexer and the parser were not in sync. This also let us be more strict on where in the file we accept these pragmas. llvm-svn: 149014
* Remove redundant argument.Rafael Espindola2012-01-211-4/+1
| | | | llvm-svn: 148628
* Add an option to emulate the strange Apple gcc behavior of #pragma pack.Eli Friedman2011-11-021-0/+11
| | | | | | <rdar://problem/10374763> llvm-svn: 143527
* OpenCL: disallow '#pragma OPENCL EXTENSION all : enable', per OpenCL 1.1 9.1Peter Collingbourne2011-10-061-2/+5
| | | | llvm-svn: 141270
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* PR10392: "#pragma GCC visibility" must not expand macros in itsJoerg Sonnenberger2011-07-201-5/+5
| | | | | | arguments. llvm-svn: 135552
* Remove unused but set variable.Benjamin Kramer2011-05-031-1/+0
| | | | llvm-svn: 130776
* Recognize gcc's ms_struct pragma (and ignore for now).Fariborz Jahanian2011-04-251-0/+32
| | | | | | This is wip. llvm-svn: 130138
* Do not expand the opencl pragma names. This is so you can also have a define ↵Tanya Lattner2011-04-141-1/+1
| | | | | | named the samed as the pragma and they do not interfere (ie. cl_khr_fp64). llvm-svn: 129549
* Rename tok::eom to tok::eod.Peter Collingbourne2011-02-281-5/+5
| | | | | | | | The previous name was inaccurate as this token in fact appears at the end of every preprocessing directive, not just macro definitions. No functionality change, except for a diagnostic tweak. llvm-svn: 126631
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-141-0/+50
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actionsPeter Collingbourne2011-02-141-0/+11
| | | | llvm-svn: 125474
* Convert "#pragma unused(...)" into tokens for the parser.Argyrios Kyrtzidis2011-01-171-3/+25
| | | | | | | This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function. Fixes rdar://8829590&8770988. llvm-svn: 123666
* When we parse a pragma, keep track of how that pragma was originallyDouglas Gregor2010-09-091-6/+18
| | | | | | | | spelled (#pragma, _Pragma, __pragma). In -E mode, use that information to add appropriate newlines when translating _Pragma and __pragma into #pragma, like GCC does. Fixes <rdar://problem/8412013>. llvm-svn: 113553
* One who seeks knowledge learns something new every day.John McCall2010-08-261-13/+12
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-1/+1
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-1/+1
| | | | llvm-svn: 111795
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-2/+2
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* Implement #pragma GCC visibility.Eli Friedman2010-08-051-0/+53
| | | | llvm-svn: 110315
* Parser: Add support for #pragma align, which is just another spelling of #pragmaDaniel Dunbar2010-07-311-13/+27
| | | | | | options align. llvm-svn: 109952
* Move the "current scope" state from the Parser into Action. ThisDouglas Gregor2010-07-021-1/+1
| | | | | | | | | | | | | | allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. llvm-svn: 107491
* Parse/Sema: Add support for '#pragma options align=packed', which, it should beDaniel Dunbar2010-05-271-0/+2
| | | | | | noted, is not the same as __attribute__((packed)). That would be ridiculous! llvm-svn: 104865
* Parse/Sema: Add support for '#pragma options align=native'.Daniel Dunbar2010-05-271-3/+5
| | | | llvm-svn: 104864
* Parse: Add support for '#pragma options align'.Daniel Dunbar2010-05-261-2/+51
| | | | | | Also, fix a source location bug with the rparen in #pragma pack. llvm-svn: 104784
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-17/+17
| | | | llvm-svn: 81346
* Per advice that Doug Gregor gave me several months ago, clean up theTed Kremenek2009-08-031-25/+8
| | | | | | | | | | | | | implementation of '#pragma unused' by not constructing intermediate DeclRefExprs, but instead do the name lookup directly. The implementation is greatly simplified. Along the way, degrade '#pragma unused(undeclaredvariable)' to a warning instead of being a hard error. This implements: <rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning) llvm-svn: 78019
* Add parser support for #pragma weak.Eli Friedman2009-06-051-1/+56
| | | | llvm-svn: 72907
* Implement '#pragma unused'.Ted Kremenek2009-03-231-2/+78
| | | | llvm-svn: 67569
* move library-specific diagnostic headers into library private dirs. ReduceChris Lattner2009-01-291-1/+1
| | | | | | redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
* Split the single monolithic DiagnosticKinds.def file into oneChris Lattner2009-01-271-1/+1
| | | | | | | | | .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
* Modify the move emulation according to the excellent design of Howard ↵Sebastian Redl2008-12-101-1/+1
| | | | | | Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers. llvm-svn: 60809
* Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResultSebastian Redl2008-12-091-2/+1
| | | | llvm-svn: 60791
* Consistently use smart pointers for stmt and expr nodes in parser local ↵Sebastian Redl2008-12-091-10/+6
| | | | | | variables. llvm-svn: 60761
* Use RAII objects to ensure proper destruction of expression and statement ↵Sebastian Redl2008-11-251-1/+6
| | | | | | AST nodes in the parser in most cases, even on error. llvm-svn: 60057
* Convert IdentifierInfo's to be printed the same as DeclarationNames Chris Lattner2008-11-231-5/+5
| | | | | | | | | | | | | | | | | | | | | with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
* remove uses of IdentifierInfo::getName()Chris Lattner2008-11-191-4/+2
| | | | llvm-svn: 59607
* Remove the last of the old-style Preprocessor::Diag methods.Chris Lattner2008-11-181-4/+4
| | | | llvm-svn: 59554
* Add Parser support for #pragma packDaniel Dunbar2008-10-041-0/+108
- Uses Action::ActOnPragmaPack - Test case is XFAIL pending verifier fixes. llvm-svn: 57066
OpenPOWER on IntegriCloud