| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 195962
|
|
|
|
|
|
| |
the custom subject for the ibaction attribute.
llvm-svn: 195960
|
|
|
|
|
|
| |
enumerant because that's already taken by the Record class.
llvm-svn: 195875
|
|
|
|
|
|
| |
diagnostic for attribute subjects. In turn, this allows the Subjects to be enabled for some more attributes and improves diagnostics. Updated a test case based on the improved diagnostic.
llvm-svn: 195864
|
|
|
|
|
|
|
|
|
|
|
|
| |
attribute subjects. This makes some modifications to the way subjects are listed in Attr.td, and updates the attr emitter to handle the new constructs.
I have disabled some attribute subject lines on purpose in Attr.td;
this part is a WIP with the goal being to restore those subjects
incrementally. By commenting them out, it leaves the original behavior
the same as before for those attributes and so those are not
functionality changes.
llvm-svn: 195841
|
|
|
|
|
|
|
|
| |
look at the attribute spelling instead. The 'ownership_*' attributes should
probably be split into separate *Attr classes, but that's more than I wanted to
do here.
llvm-svn: 195805
|
|
|
|
|
|
| |
semantic analysis. Removes some magic numbers.
llvm-svn: 195287
|
|
|
|
|
|
| |
coded into the parser. Instead, they are automatically listed through tablegen.
llvm-svn: 193989
|
|
|
|
|
|
| |
QualType with a SourceLocation stashed alongside.
llvm-svn: 193803
|
|
|
|
|
|
|
|
|
|
|
|
| |
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.
I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.
llvm-svn: 193295
|
|
|
|
|
|
|
|
| |
that a function can be called in. This reduced the total number of annotations
needed and makes writing more complicated behaviour less burdensome.
Patch by chriswails@gmail.com.
llvm-svn: 191983
|
|
|
|
|
|
| |
arguments to map strings to the proper enumeration value. This makes error checking more consistent and reduces the amount of hand-written code required.
llvm-svn: 190545
|
|
|
|
|
|
| |
argument. Instead, it takes an expression that is fully resolved.
llvm-svn: 190476
|
|
|
|
|
|
| |
This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required.
llvm-svn: 190368
|
|
|
|
|
|
| |
StringArgument since that is a more accurate modeling.
llvm-svn: 189851
|
|
|
|
| |
llvm-svn: 187474
|
|
|
|
|
|
| |
tablegen. In turn, this fixes a mistake with Ptr32, Ptr64, UPtr and SPtr attribtues generating AST nodes that are never actually used.
llvm-svn: 187401
|
|
|
|
|
|
| |
Richard Smith pointed this out over a month ago.
llvm-svn: 181830
|
|
|
|
| |
llvm-svn: 181042
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180973
|
|
|
|
| |
llvm-svn: 180972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180970
|
|
|
|
|
|
|
|
| |
Required making a handful of changes to the table generator. Also adds
an unspecified inheritance attribute. This opens the path for us to
apply these attributes to C++ records implicitly.
llvm-svn: 178054
|
|
|
|
|
|
|
|
|
| |
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.
llvm-svn: 174133
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Indents were given the color blue when outputting with color.
AST dumping now looks like this:
Node
|-Node
| `-Node
`-Node
`-Node
Compared to the previous:
(Node
(Node
(Node))
(Node
(Node)))
llvm-svn: 174022
|
|
|
|
|
|
| |
file contents being autogenerated
llvm-svn: 173979
|
|
|
|
|
|
| |
instantiation.
llvm-svn: 173768
|
|
|
|
|
|
|
|
|
| |
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.
llvm-svn: 173746
|
|
|
|
| |
llvm-svn: 173597
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td.
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself.
Thanks to Richard Smith for the idea and review.
llvm-svn: 173358
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
| |
tools/clang/include/clang/AST/AttrDump.inc
llvm-svn: 171768
|
|
|
|
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D234
Patch by Philip Craig!
llvm-svn: 171760
|
|
|
|
|
|
|
|
|
|
|
| |
not ReadExpr().
Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.
Fixes rdar://12584141 & http://llvm.org/PR13982
llvm-svn: 168017
|
|
|
|
|
|
|
| |
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.
llvm-svn: 165770
|
|
|
|
| |
llvm-svn: 165649
|
|
|
|
|
|
| |
potential crasher -- Context is sometimes a null reference (!!) here.
llvm-svn: 162007
|
|
|
|
| |
llvm-svn: 160492
|
|
|
|
|
|
| |
getValueAsString()).
llvm-svn: 159662
|
|
|
|
|
|
| |
Rose and Richard Smith for catching these.
llvm-svn: 158826
|
|
|
|
|
|
|
| |
caused a crash in an obscure case. On the plus side, it caused me to catch
another bug by inspection.
llvm-svn: 158767
|
|
|
|
|
|
|
|
| |
The original r158700 caused crashes in the gcc test suite,
g++.abi/vtable3a.C among others. It also caused failures in the libc++
test suite.
llvm-svn: 158749
|
|
|
|
| |
llvm-svn: 158731
|
|
|
|
|
|
|
| |
I've also removed the duplicate check for PARSED_ATTR since it seems
unnecessary, and would have made the code more complicated.
llvm-svn: 158716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.
Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.
I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.
llvm-svn: 158700
|
|
|
|
|
|
|
|
| |
Now, as long as the 'Namespaces' variable is correct inside Attr.td, the
generated code will correctly admit a C++11 attribute only when it has the
appropriate namespace(s).
llvm-svn: 158661
|
|
|
|
|
|
|
|
| |
Get rid of a bunch of header files. TableGen output should be unaffected.
Patch by Sean Silva!
llvm-svn: 158388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't copy the visibility attribute during instantiations. We have to be able
to distinguish
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template DEFAULT void bar<foo>();
from
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template void bar<foo>();
* If an instantiation has an attribute, it takes precedence over an attribute
in the template.
* With instantiation attributes handled with the above logic, we can now
select the minimum visibility when looking at template arguments.
llvm-svn: 156821
|
|
|
|
|
|
|
| |
attribute, rather than requiring multiple cases in consumers of this
information.
llvm-svn: 156666
|
|
|
|
|
|
|
|
| |
TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only
time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me
at StringMatcher!
llvm-svn: 156003
|