| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.
llvm-svn: 139352
|
| |
|
|
|
|
|
| |
indicates that a declaration is only visible within the module it is
declared in.
llvm-svn: 139348
|
| |
|
|
|
|
| |
Expr::Ignore* methods that also look through implicit casts.
llvm-svn: 139303
|
| |
|
|
|
|
| |
This patch was written by DeLesley Hutchins.
llvm-svn: 139302
|
| |
|
|
|
|
|
| |
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.
llvm-svn: 139297
|
| |
|
|
|
|
|
|
|
|
| |
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
|
| |
|
|
|
|
|
|
|
|
| |
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).
Fixes <rdar://problem/10063539>.
llvm-svn: 139185
|
| |
|
|
|
|
| |
happen when RecordLayoutBuilder is used by Codegen, not Sema.
llvm-svn: 139162
|
| |
|
|
|
|
| |
whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided.
llvm-svn: 139111
|
| |
|
|
|
|
| |
Fix the cast kind for a cast from floating-point to enum type. (The difference isn't actually visible, but that's just because IRGen is overly forgiving.) Per report by Enea Zaffanella on cfe-dev.
llvm-svn: 139011
|
| |
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
| |
|
|
|
|
|
|
|
| |
LangOptions, rather than making distinct copies of
LangOptions. Granted, LangOptions doesn't actually get modified, but
this will eventually make it easier to construct ASTContext and
Preprocessor before we know all of the LangOptions.
llvm-svn: 138959
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.
Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.
llvm-svn: 138926
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the function in question when applicable (that is, not for blocks).
Patch by Joerg Sonnenberger with some stylistic tweaks by me.
When discussing this weth Joerg, streaming the decl directly into the
diagnostic didn't work because we have a pointer-to-const, and the
overload doesn't accept such. In order to make my style tweaks to the
patch, I first changed the overload to accept a pointer-to-const, and
then changed the diagnostic printing layer to also use
a pointer-to-const, cleaning up a gross line of code along the way.
llvm-svn: 138854
|
| |
|
|
|
|
|
|
|
| |
This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.
llvm-svn: 138821
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory
and combine them in the Create function.
llvm-svn: 138817
|
| |
|
|
|
|
| |
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
|
| |
|
|
|
|
|
|
|
|
| |
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.
llvm-svn: 138709
|
| |
|
|
|
|
|
|
|
|
|
| |
after having already deserialized the fields, clear out the fields
first. This makes sure that we keep all of the declarations in the
lexical context (including those implicitly added by later
type-checking) within the same list. A test case for this behavior is
coming as part of another commit; testing for this problem in
isolation is a nightmare.
llvm-svn: 138661
|
| |
|
|
| |
llvm-svn: 138631
|
| |
|
|
| |
llvm-svn: 138498
|
| |
|
|
|
|
|
|
|
|
| |
table when serializing an AST file. This was a holdover from the days
before chained PCH, and is a complete waste of time and storage
now. It's a good thing it's useless, because I have no idea how I
would have implemented MaterializeVisibleDecls efficiently in the
presence of modules.
llvm-svn: 138496
|
| |
|
|
|
|
| |
// rdar://9362887.
llvm-svn: 138412
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
const int &x = x;
This crashed by inifinetly recursing within the lvalue evaluation
routine. I've added a (somewhat) braindead way of preventing this
recursion. If folks have better suggestions for how to avoid it I'm all
ears.
That said, we have some work to do. This doesn't trigger a single
warning for uninitialized, self-initialized or otherwise completely
wrong code. In some senses, the crash was almost better.
llvm-svn: 138239
|
| |
|
|
| |
llvm-svn: 138235
|
| |
|
|
| |
llvm-svn: 137896
|
| |
|
|
|
|
| |
idiomatic code.
llvm-svn: 137870
|
| |
|
|
|
|
|
|
| |
user-declared) as implicit.
This results in libclang ignoring such methods.
llvm-svn: 137852
|
| |
|
|
|
|
|
|
| |
even when overloaded and user-defined. These operators are both more
valuable to warn on (due to likely typos) and extremely unlikely to be
reasonable for use to trigger side-effects.
llvm-svn: 137823
|
| |
|
|
| |
llvm-svn: 137799
|
| |
|
|
| |
llvm-svn: 137653
|
| |
|
|
| |
llvm-svn: 137585
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.
Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};
This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.
llvm-svn: 137573
|
| |
|
|
|
|
| |
attribute of a property. patch by Remy Demarest fixes it.
llvm-svn: 137509
|
| |
|
|
|
|
|
| |
in the AST format, which are built lazily by the ASTContext when
requested.
llvm-svn: 137437
|
| |
|
|
|
|
|
| |
AST file format, lazily generating the actual declaration in
ASTContext as needed.
llvm-svn: 137434
|
| |
|
|
|
|
|
| |
AST file format, lazily generating the actual declaration in
ASTContext as needed.
llvm-svn: 137431
|
| |
|
|
|
|
|
|
|
| |
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.
llvm-svn: 137429
|
| |
|
|
|
|
|
|
|
| |
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.
llvm-svn: 137349
|
| |
|
|
|
|
|
| |
This is necessary to support importing certain
function pointer types.
llvm-svn: 137311
|
| |
|
|
|
|
| |
the C++0x 'constexpr' keyword.
llvm-svn: 137230
|
| |
|
|
|
|
|
|
| |
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.
llvm-svn: 137124
|
| |
|
|
|
|
|
| |
types to AST files; they're only used by debug info generation anyway,
and shouldn't ever exist in the AST anyway.
llvm-svn: 137122
|
| |
|
|
|
|
|
|
| |
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.
llvm-svn: 137121
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes cases where the anonymous bitfield is followed by a bitfield member.
E.g.,
struct t4
{
char foo;
long : 0;
char bar : 1;
};
rdar://9859156
llvm-svn: 136991
|
| |
|
|
| |
llvm-svn: 136963
|
| |
|
|
| |
llvm-svn: 136944
|
| |
|
|
| |
llvm-svn: 136929
|
| |
|
|
| |
llvm-svn: 136907
|
| |
|
|
| |
llvm-svn: 136892
|