- Feb 20, 2014
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201796 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 13, 2014
-
-
Alexey Bataev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201297 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
These features are new in VS 2013 and are necessary in order to layout std::ostream correctly. Currently we have an ABI incompatibility when self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper in gtest. This change adds another implicit attribute, MSVtorDispAttr, because implicit attributes are currently the best way to make sure the information stays on class templates through instantiation. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2746 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201274 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 10, 2014
-
-
David Majnemer authored
Introduce a notion of a 'current representation method' for pointers-to-members. When starting out, this is set to 'best case' (representation method is chosen by examining the class, selecting the smallest representation that would work given the class definition or lack thereof). This pragma allows the translation unit to dictate exactly what representation to use, similar to how the inheritance model keywords operate. N.B. PCH support is forthcoming. Differential Revision: http://llvm-reviews.chandlerc.com/D2723 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201105 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Create a new diagnostic, -Wignored-pragmas and use it to handle any case where a pragma would have a side effect but is ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201102 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 17, 2014
-
-
Richard Smith authored
attribute syntax. There's nothing generalized about this; it's one of several first-class attribute syntaxes we support, all of which are more-or-less equally general. As discussed on cfe-commits, we may want to revisit this if we start allowing this syntax as an extension in C (or if C adopts the syntax), but hopefully this diagnostic wording will be crystal clear to everyone in the mean time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199443 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 12, 2014
-
-
Alp Toker authored
Various attribute flavours are supported in C++98. Make it clear that this compatibility warning relates specifically to C++11-style generalized attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199053 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 07, 2014
-
-
Alp Toker authored
This backs out changes in commit r198605 and part of r198604, replacing the original tok::kw_template with a slightly more obvious placeholder tok::unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198666 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 06, 2014
-
-
Alp Toker authored
As far as the parser is concerned the tag type is always a keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198606 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alp Toker authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198599 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 01, 2014
-
-
Alp Toker authored
1) Teach ExpectAndConsume() to emit expected and expected-after diagnostics using the generic diagnostic descriptions added in r197972, eliminating another set of trivial err_expected_* variations while maintaining existing behaviour. 2) Lift SkipUntil() recovery out of ExpectAndConsume(). The Expect/Consume family of functions are primitive parser operations that now have the well-defined property of operating on single tokens. Factoring out recovery exposes opportunities for more consistent and tailored error recover at the call sites instead of just relying on a bottled SkipUntil formula. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198270 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 31, 2013
-
-
Serge Pavlov authored
Previously any error in enum definition body stopped parsing it. With this change parser tries to recover from errors. The patch fixes PR10982. Differential Revision: http://llvm-reviews.chandlerc.com/D2018 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198259 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 24, 2013
-
-
Alp Toker authored
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
-
- Dec 12, 2013
-
-
Alp Toker authored
Type trait parsing is all over the place at the moment with unary, binary and n-ary C++11 type traits that were developed independently at different points in clang's history. There's no good reason to handle them separately -- there are three parsers, three AST nodes and lots of duplicated handling code with slightly different implementations and diags for each kind. This commit unifies parsing of type traits and sets the stage for further consolidation. No change in behaviour other than more consistent error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197179 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 09, 2013
-
-
Alp Toker authored
Changed from: keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit To: keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit This is a more accurate description of clang's keyword compatibility feature, given that some of the keywords are turned into context-sensitive keywords (e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196776 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 04, 2013
-
-
Fariborz Jahanian authored
which specifies couple of (optional) method selectors for bridging a CFobject to or from an ObjectiveC object. This is wip. // rdsr://15499111 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196408 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
simple-template-ids (eg, 'operator+<int>') in weird places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196333 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 03, 2013
-
-
Alp Toker authored
clang converts keywords to identifiers for compatibility with various system headers such as GNU libc. Implement a -Wkeyword-compat extension warning to diagnose those cases. The warning is on by default but will generally be ignored in system headers. It can however be enabled globally to aid standards conformance testing. This also changes the __uptr keyword avoidance from r195710 to no longer special-case system headers, bringing it in line with other similar workarounds in clang. Implementation returns bool for symmetry with token annotation functions. Some examples: warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat] struct __is_pod warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat] union w *__uptr; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196212 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 16, 2013
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194872 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 15, 2013
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194849 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 09, 2013
-
-
Richard Smith authored
definition. If we see something that looks like a namespace definition inside a class, that strongly indicates that a close brace was missing somewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194319 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 05, 2013
-
-
Kaelyn Uhrain authored
Revert this patch until cases of rejected valid code (e.g. identifiers that require ADL to be resolved properly) are fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194088 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 04, 2013
-
-
Kaelyn Uhrain authored
Similar C code isn't caught as it seems to hit a different code path. Also, as the check is only done for record pointers, cases involving an overloaded operator-> are not handled either. Note that the reason this check is done in the parser instead of Sema is not related to having enough knowledge about the current state as it is about being able to fix up the parser's state to be able to recover and traverse the correct code paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194002 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 02, 2013
-
-
David Majnemer authored
The determination of which diagnostics would be issued for certain anonymous unions started to get a little ridiculous. Clean this up by inverting the condition-tree's logic from dialect -> issue to issue -> diagnostic. As part of this cleanup, move ext_c99_flexible_array_member from DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by Sema, not Parse. Also, the liberty was taken to edit ext_c99_flexible_array_member to match other, similar, diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193919 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
The declaration of a flexible array member was correctly diagnosed as an extension in C89 mode but not in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193918 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 31, 2013
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193774 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
into a separate "parse an attribute that takes a type argument" codepath. This results in both codepaths being a lot cleaner and simpler, and fixes some bugs where the type argument handling bled into the expression argument handling and caused us to both accept invalid and reject valid attribute arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193731 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 30, 2013
-
-
Alp Toker authored
It's possible to embed the frontend in applications that haven't initialized backend targets so we need to handle this condition gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193685 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 18, 2013
-
-
David Majnemer authored
Summary: Some MS headers use these features. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1948 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 15, 2013
-
-
Richard Smith authored
that looks like a function declaration, except that it's missing a return type, try typo-correcting it to the relevant constructor name. In passing, fix a bug where the missing-type-specifier recovery codepath would drop a preceding scope specifier on the floor, leading to follow-on diagnostics and incorrect recovery for the auto-in-c++98 hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 09, 2013
-
-
David Majnemer authored
An invalid decltype expression like 'decltype int' gives: error: expected '(' after 'decltype' This makes it so 'sizeof int' gives a similar one: error: expected parentheses around type name in sizeof expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192258 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 08, 2013
-
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192204 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
This fixes PR16992 - Fixit missing when "sizeof type" found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192200 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 04, 2013
-
-
Peter Collingbourne authored
explicit template instantiation" warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189893 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 21, 2013
-
-
Eli Friedman authored
We generally don't warn about extensions involving keywords reserved for the implementation, so we shouldn't warn here either: the standard doesn't require it, and it doesn't provide useful information to the user. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188840 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eli Friedman authored
This adds the following as subgroups of -Wgnu: -Wgnu-alignof-expression, -Wgnu-case-range, -Wgnu-complex-integer, -Wgnu-conditional-omitted-operand, -Wgnu-empty-initializer, -Wgnu-label-as-value, -Wgnu-local-label, and -Wgnu-statement-expression, Patch by Peter Lewis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188839 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 06, 2013
-
-
Larisse Voufo authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187768 91177308-0d34-0410-b5e6-96231b3b80d8
-
Larisse Voufo authored
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 23, 2013
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186955 91177308-0d34-0410-b5e6-96231b3b80d8
-