aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/TokenKinds.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-05-08[C++11] Use 'nullptr'.Craig Topper1-4/+4
llvm-svn: 208280
2014-01-06Prospective MSVC 2010 build fixAlp Toker1-3/+3
Try to fix Compiler Error C2011 following r198607 by removing enum from 'enum TokenKind' parameter types. llvm-svn: 198621
2014-01-06Support diagnostic formatting of keyword tokensAlp Toker1-0/+8
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. llvm-svn: 198604
2014-01-06Rename getTokenSimpleSpelling() to getPunctuatorSpelling()Alp Toker1-1/+1
That's what it does, what the documentation says it does and what callers expect it to do. llvm-svn: 198603
2014-01-06Apply some LLVM_READONLY / LLVM_READNONE on diagnostic functionsAlp Toker1-3/+5
llvm-svn: 198598
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-1/+0
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
2009-11-28This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def ↵Kovarththanan Rajaratnam1-53/+2
and makes use of it in tok::getTokenSimpleSpelling. llvm-svn: 90042
2009-02-27Clean up and document code modification hints.Douglas Gregor1-3/+1
llvm-svn: 65641
2009-02-26Introduce code modification hints into the diagnostics system. When weDouglas Gregor1-0/+63
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). llvm-svn: 65570
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner1-0/+29
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402