summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParsePragma.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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