aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticParseKinds.td
AgeCommit message (Collapse)Author
2013-05-06Move PragmaCommentHandler to lib/Parse in preparation for calling SemaReid Kleckner
Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181246 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Move parsing of identifiers in MS-style inline assembly intoJohn McCall
the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26Implement C++1y decltype(auto).Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24Objective-C parsing [qoi]: Recover gracefully with good diagnosticFariborz Jahanian
when class implementation declaration adds protocol qualifier list. // rdar://12233858 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180228 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23Warn that scoped enumerations are a C++11 extenstion when compiling inRichard Trieu
C++98 mode. This improves on the previous diagnostic message of: error: expected identifier or '{' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180076 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Fix PR4296: Add parser detection/error recovery for nested functions, from ↵Douglas Gregor
Serve Pavlov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179603 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Basic support for Microsoft property declarations andJohn McCall
references thereto. Patch by Tong Shen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04Make the ObjC attributes diagnostics a bit more informative.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178720 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03Emit a nicer diagnostic for misplaced attributes on ObjC directives.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178670 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-01PR15633: Note that we are EnteringContext when parsing the nested nameRichard Smith
specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent name specifier is used to declare an enum template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Objective-C [qoi]: Provide improved parse diagnostics whenFariborz Jahanian
closing rbrace is missing in an ObjC class declaration. Can do beter than this, but it involves addition of overhead which will be present in correct code. // rdar://6854840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-28Fix warning text of my last patch.Fariborz Jahanian
// rdar://13158394 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176308 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-28objective-C: clang, following gcc, warns onFariborz Jahanian
use of stand-alone protocol as type and uses id<proto>. Modify warning to say what compiler is doing. // rdar//13158394 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Handle alignas(foo...) pack expansions.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175875 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,Richard Smith
to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting levels for parentheses, brackets and braces. Some code with heavy macro use exceeds the default limit of 256, but we don't want to increase it generally to avoid stack overflow on stack-constrained systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175855 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20PR15311: Finish implementation of the suggested resolution of core issue 1488,Richard Smith
which allows grouping parens in an abstract-pack-declarator. This was already mostly implemented, but missed some cases. Add an ExtWarn for use of this extension until CWG ratifies it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175660 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29Produce a diagnostic if alignas is applied to an expression. Neither C11 norRichard Smith
C++11 allows that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173789 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26Give a more informative error message when the dot or arrow operator is usedRichard Trieu
on a type. Currently, it gives a generic "expected unqualified-id" error. The new error message is "cannot use (dot|arrow) operator on a type". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22[ms-inline asm] Remove a warning about ms-style inline assembly not beingChad Rosier
supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173177 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-17Parsing support for C11's _Noreturn keyword. No semantics yet.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172761 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-17Implement C++11 semantics for [[noreturn]] attribute. This required splittingRichard Smith
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-24Make err_module_expected_semi consistent with all the other expected_semi diags.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-17Refactored duplicate string literal lexing code within Preprocessor, into aAndy Gibbs
common LexStringLiteral function. In doing so, some consistency problems have been ironed out (e.g. where the first token in the string literal was lexed with macro expansion, but subsequent ones were not) and also an erroneous diagnostic has been corrected. LexStringLiteral is complemented by a FinishLexStringLiteral function which can be used in the situation where the first token of the string literal has already been lexed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168266 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15Remove unused diagnostics from TableGen files.Dmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-05Our style for diagnostic messages is to not include a trailing dot.Matt Beaumont-Gay
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02Fix grammar of diagnostic message.Richard Trieu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167319 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02Tweak wording and add diagnostic groups to misc diagnostics.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167274 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02Change diagnostics for enums with fixed underlying type so in C++98 mode, we ↵Eli Friedman
cite C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167273 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02When finding a '(' after '::', emit error with hint to remove '(' and matchingRichard Trieu
')', if found. Don't crash. Fixes PR11852. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167268 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-27Reverted back the changes made in 166868 and in 166869Mahesha S
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-27Feature:Mahesha S
OpenMP support. Sub-Feature: Support for "#pragma omp ..." registration with Preprocessor. Files Changed/Added: * include/clang/Basic/DiagnosticGroups.td (C) * include/clang/Basic/DiagnosticParseKinds.td (C) * include/clang/Basic/TokenKinds.def (C) * include/clang/Parse/Parser.h (C) * lib/Parse/Parser.cpp (C) Test Cases Changed/Added: * test/Preprocessor/pragma_omp.c (A) * test/Preprocessor/pragma_omp_ignored_warning.c (A) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166869 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-21Fix typo, make test case slightly more reabable. Thanks to Dmitri Gribenko forLang Hames
the suggestions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166400 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-21When used in a compound expression FP_CONTRACT should proceed all explicitLang Hames
declarations and statements. Emit an error if the FP_CONTRACT is used later in a compound statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-20DR1473: Do not require a space between operator"" and the ud-suffix in aRichard Smith
literal-operator-id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166373 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25Fix for r163013 regression and further __interface enhancement.John McCall
Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164590 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17objective-C: improve on warnings about misplacement of methodFariborz Jahanian
argument names. // rdar://12263549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164077 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17objective-C: issue warning when there is no whitespaceFariborz Jahanian
between objc method parameter name and colon. // rdar://12263549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164047 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Revert "objective-C: warn under a flag if missing argument"Ted Kremenek
We plan on discussing this more, but we shouldn't have it in the compiler in an incomplete state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163720 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Revert "objective-C: warn if selector has nothing but bare"Ted Kremenek
We plan on discussing this more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11objective-C: warn if selector has nothing but bareFariborz Jahanian
':' in its name. // rdar://8366823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11objective-C: warn under a flag if missing argumentFariborz Jahanian
name results in unintended selector name. // rdar://12263549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163634 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04Revert r163083 per chandlerc's request.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Normalize line endings of r163013 (part 2).Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Improved MSVC __interface support by adding first class support for it, ↵Joao Matos
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Reversing the logic since C99 mode is actually not an extension. Also, ↵Aaron Ballman
changing the group to the singular to match the diagnostic better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162838 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28Splitting the duplicated decl spec extension warning into two: one is an ↵Aaron Ballman
ExtWarn and the other a vanilla warning. This addresses PR13705, where const char const * wouldn't warn unless -pedantic was specified under the right conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162793 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Add support for "type safety" attributes that allow checking that 'void *'Dmitri Gribenko
function arguments and arguments for variadic functions are of a particular type which is determined by some other argument to the same function call. Usecases include: * MPI library implementations, where these attributes enable checking that buffer type matches the passed MPI_Datatype; * for HDF5 library there is a similar usecase as MPI; * checking types of variadic functions' arguments for functions like fcntl() and ioctl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162067 91177308-0d34-0410-b5e6-96231b3b80d8