summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/TokenKinds.h
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-301-2/+1
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345637 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-12/+12
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++1z] Support for u8 character literals.Richard Smith2014-11-081-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221576 91177308-0d34-0410-b5e6-96231b3b80d8
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215557 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Drop legacy conditionals for TokenKind's underlying typeAlp Toker2014-03-021-1/+1
| | | | | | This relies on forward declaration of enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202605 91177308-0d34-0410-b5e6-96231b3b80d8
* Prospective MSVC 2010 build fixAlp Toker2014-01-061-3/+3
| | | | | | | Try to fix Compiler Error C2011 following r198607 by removing enum from 'enum TokenKind' parameter types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198621 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct underlying integer type of enum TokenKindAlp Toker2014-01-061-1/+1
| | | | | | | | | | This matches up the underlying type against the actual storage type 'unsigned short' and lets us get rid of some casts while we're at it. Effort is made to keep this building in pre-C++11 but as with other features Token will be less efficiently packed in in legacy configurations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198607 91177308-0d34-0410-b5e6-96231b3b80d8
* Support diagnostic formatting of keyword tokensAlp Toker2014-01-061-0/+4
| | | | | | | | | Implemented with a new getKeywordSpelling() accessor. Unlike getTokenName() the result of this function is stable and may be used in diagnostic output. Uses of this feature are split out into the subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198604 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getTokenSimpleSpelling() to getPunctuatorSpelling()Alp Toker2014-01-061-1/+1
| | | | | | | That's what it does, what the documentation says it does and what callers expect it to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198603 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply some LLVM_READONLY / LLVM_READNONE on diagnostic functionsAlp Toker2014-01-061-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198598 91177308-0d34-0410-b5e6-96231b3b80d8
* Support and use token kinds as diagnostic argumentsAlp Toker2013-12-241-1/+3
| | | | | | | | | | | | | | | | | | | Introduce proper facilities to render token spellings using the diagnostic formatter. Replaces most of the hard-coded diagnostic messages related to expected tokens, which all shared the same semantics but had to be multiply defined due to variations in token order or quote marks. The associated parser changes are largely mechanical but they expose commonality in whole chunks of the parser that can now be factored away. This commit uses C++11 typed enums along with a speculative legacy fallback until the transition is complete. Requires corresponding changes in LLVM r197895. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197972 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle _Pragma on a u8, u, or U string literal per the C11 specification. AlsoRichard Smith2013-03-091-6/+12
| | | | | | | | | handle raw string literals here. C++11 doesn't yet specify how they will behave, but discussion on core suggests that we should just strip off everything but the r-char-sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176779 91177308-0d34-0410-b5e6-96231b3b80d8
* Compatibility macro detection for the -Wimplicit-fallthrough diagnostic.Alexander Kornienko2012-09-281-0/+25
| | | | | | | | | | | | | | | | | | | Summary: When issuing a diagnostic message for the -Wimplicit-fallthrough diagnostics, always try to find the latest macro, defined at the point of fallthrough, which is immediately expanded to "[[clang::fallthrough]]", and use it's name instead of the actual sequence. Known issues: * uses PP.getSpelling() to compare macro definition with a string (anyone can suggest a convenient way to fill a token array, or maybe lex it in runtime?); * this can be generalized and used in other similar cases, any ideas where it should reside then? Reviewers: doug.gregor, rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D50 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164858 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup:James Dennett2012-07-021-8/+6
| | | | | | | | | | | | * Primarily, added \brief to most of include/clang/Basic, instead of prefixing the comments with "DeclaredName - "; * Made some brief summaries significantly briefer; * Fixed up some erroneous uses of \see and \arg; * Fixed up some extraneous backslashes in \code...\endcode blocks; * Fixed up some typos/spelling errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159616 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup: reformatting/fixing up file comments so that they haveJames Dennett2012-07-021-3/+4
| | | | | | | | | \file and \brief markup and appear in Doxygen's summaries (and eventually at http://clang.llvm.org/doxygen/files.html). Fixed up another couple of minor glitches in the docs at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159517 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LexOnOffSwitch a Preprocessor member functionPeter Collingbourne2011-02-141-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125473 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up and document code modification hints.Douglas Gregor2009-02-271-1/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce code modification hints into the diagnostics system. When weDouglas Gregor2009-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | know how to recover from an error, we can attach a hint to the diagnostic that states how to modify the code, which can be one of: - Insert some new code (a text string) at a particular source location - Remove the code within a given range - Replace the code within a given range with some new code (a text string) Right now, we use these hints to annotate diagnostic information. For example, if one uses the '>>' in a template argument in C++98, as in this code: template<int I> class B { }; B<1000 >> 2> *b1; we'll warn that the behavior will change in C++0x. The fix is to insert parenthese, so we use code insertion annotations to illustrate where the parentheses go: test.cpp:10:10: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++0x B<1000 >> 2> *b1; ^ ( ) Use of these annotations is partially implemented for HTML diagnostics, but it's not (yet) producing valid HTML, which may be related to PR2386, so it has been #if 0'd out. In this future, we could consider hooking this mechanism up to the rewriter to actually try to fix these problems during compilation (or, after a compilation whose only errors have fixes). For now, however, I suggest that we use these code modification hints whenever we can, so that we get better diagnostics now and will have better coverage when we find better ways to use this information. This also fixes PR3410 by placing the complaint about missing tokens just after the previous token (rather than at the location of the next token). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified current clients of Bitcode-Object serialization to use theTed Kremenek2007-10-241-29/+0
| | | | | | | | | | | new split-header file configuration (Serialize.h and Deserialize.h) now in place in the core LLVM repository. Removed unneeded SerializeTrait specializations for enums in TokenKinds.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43306 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented serialization for IdentifierInfo and IdentifierTable.Ted Kremenek2007-10-231-0/+29
| | | | | | | | Updated serialization test code in the driver to test serialization of these types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43266 91177308-0d34-0410-b5e6-96231b3b80d8
* Stage two of getting CFE top correct.Reid Spencer2007-07-111-0/+51
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8