Commit Graph

6506 Commits

Author SHA1 Message Date
Douglas Gregor 721e82edbc Kill CXEntity and CXDecl. The first has never been used, while the
second has been wholly replaced by cursors.

llvm-svn: 94039
2010-01-20 22:14:22 +00:00
John McCall 401982f56c First pass at collecting access-specifier information along inheritance paths.
Triggers lots of assertions about missing access information;  fix them.

Will actually consume this information soon.

llvm-svn: 94038
2010-01-20 21:53:11 +00:00
Douglas Gregor dd969c897e Kill some CXDecl-related APIs that have been superceded by
CXCursor-based APIs.

llvm-svn: 94037
2010-01-20 21:45:58 +00:00
Douglas Gregor 2582af00d4 Kill CXStmt. It isn't being used anywhere, and has no future.
llvm-svn: 94036
2010-01-20 21:38:07 +00:00
Douglas Gregor 990b576ec8 Kill clang_loadDeclaration() and clang_loadTranslationUnit().
llvm-svn: 94034
2010-01-20 21:37:00 +00:00
Daniel Dunbar 73118e6d82 Use sizeof() instead of hard-coding a size for WrittenBuiltinSpecs, eek!
llvm-svn: 94024
2010-01-20 21:13:31 +00:00
Douglas Gregor 71f3d94391 Introduce a new, cursor-based traversal function that visits the
children of a given cursor, regardless of what kind of cursor it
is. This is a generalization of clang_loadDeclaration and
clang_loadTranslationUnit that will also extent to statements,
expressions, etc.

As proof-of-concept, switched clang_loadDeclaration() from its own
visitor over to an instance of this traversal function internally.

llvm-svn: 94022
2010-01-20 20:59:29 +00:00
Fariborz Jahanian 4f8a57112f Settled rule on warning on unimplemented property in
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).

llvm-svn: 94014
2010-01-20 19:36:21 +00:00
Chris Lattner 6a89c50e23 reduce redundant are's
llvm-svn: 94009
2010-01-20 17:53:58 +00:00
Chandler Carruth 4d9517c564 Fix a typo pointed about by gabor.
llvm-svn: 93997
2010-01-20 07:43:54 +00:00
Chandler Carruth 26b29a0892 Move the MacroBuilder utilitiy to its own header. Update references.
Comments and/or improvements to the documentation are welcome.

llvm-svn: 93982
2010-01-20 06:13:02 +00:00
Chandler Carruth b0af340592 Fix a layering issue between Basic and FE by moving a utility class into Basic.
This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.

llvm-svn: 93974
2010-01-20 03:59:11 +00:00
Daniel Dunbar 3f3e2cd820 Driver: Lift clang resource directory computation to the Driver object.
llvm-svn: 93971
2010-01-20 02:35:16 +00:00
John McCall 1bcb2631e6 Make UnresolvedSet.h standalone.
llvm-svn: 93964
2010-01-20 01:36:13 +00:00
Douglas Gregor 52606ff2ca Attempt to improve CIndex Doxygen organization, although I can't actually test this locally
llvm-svn: 93961
2010-01-20 01:10:47 +00:00
John McCall ad371258aa Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet.  Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.

llvm-svn: 93959
2010-01-20 00:46:10 +00:00
Douglas Gregor 9074c3fe97 Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.

llvm-svn: 93955
2010-01-20 00:26:57 +00:00
Douglas Gregor d2fc7277be Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.

llvm-svn: 93954
2010-01-20 00:23:15 +00:00
Douglas Gregor c0943d089f CXCursor_UnexposedDecl to the first declaration kind
llvm-svn: 93952
2010-01-20 00:07:45 +00:00
Douglas Gregor 084236fafd Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.

llvm-svn: 93947
2010-01-19 23:25:01 +00:00
Douglas Gregor 8f40bbee78 Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).

llvm-svn: 93946
2010-01-19 23:20:36 +00:00
Mike Stump 314825bc8a Implement goto inside of blocks.
llvm-svn: 93945
2010-01-19 23:08:01 +00:00
John McCall 5d7aa7fa0a The type of a compound literal expression is not necessarily the same as the
type which was syntactically written.  Fixes PR 6080.

llvm-svn: 93933
2010-01-19 22:33:45 +00:00
Douglas Gregor 7d1efeb43d Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.

llvm-svn: 93928
2010-01-19 22:15:34 +00:00
Douglas Gregor 015026e358 Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.

llvm-svn: 93927
2010-01-19 22:11:32 +00:00
Douglas Gregor accb183371 Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.

llvm-svn: 93924
2010-01-19 22:07:56 +00:00
Mike Stump 92244b00c7 Add CFG support for the start and end of scopes and infrastructure for
implicit destructor calls.  WIP.

llvm-svn: 93922
2010-01-19 22:00:14 +00:00
Douglas Gregor 4f46e789b3 Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.

llvm-svn: 93915
2010-01-19 21:36:55 +00:00
Douglas Gregor 6b8232ff82 Eliminate cursor kinds used to express definitions. Instead, provide
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.

This is another API + ABI breaker with no deprecation. Yay, progress.

llvm-svn: 93893
2010-01-19 19:34:47 +00:00
Zhongxing Xu cd17954dbe Fix a serious bug: Tmp3 is the wrong destination set. We should create a new
intermediate destination set Tmp4.

llvm-svn: 93873
2010-01-19 09:25:53 +00:00
Douglas Gregor ad27e8b777 Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.

llvm-svn: 93830
2010-01-19 01:20:04 +00:00
Douglas Gregor 33c34ac19a Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.

llvm-svn: 93823
2010-01-19 00:34:46 +00:00
John McCall 62e2066792 Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.

llvm-svn: 93804
2010-01-18 23:21:37 +00:00
Douglas Gregor 3338c1f5d2 Now that a reasonable deprecation cycle has passed, kill
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.

llvm-svn: 93801
2010-01-18 22:48:04 +00:00
Douglas Gregor 66a58819d1 Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.

llvm-svn: 93800
2010-01-18 22:46:11 +00:00
Chris Lattner 87d0208c41 allow the HandlerComment callback to push tokens into the
preprocessor.  This could be used by an OpenMP implementation
or something.  Patch by Abramo Bagnara!

llvm-svn: 93795
2010-01-18 22:35:47 +00:00
Douglas Gregor 49c4baf430 Clean up the CIndex API slightly.
Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.

llvm-svn: 93783
2010-01-18 22:13:09 +00:00
Daniel Dunbar c02aaa7812 Add missing newline.
llvm-svn: 93767
2010-01-18 20:55:52 +00:00
Douglas Gregor c35b54396c float, double, and long double do need extra data in the
BuiltinTypeLoc structure. Thanks, Enea!

llvm-svn: 93763
2010-01-18 20:37:56 +00:00
Ted Kremenek 473c7a72f1 Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.
llvm-svn: 93760
2010-01-18 20:23:29 +00:00
John McCall e15bbff98d Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!

llvm-svn: 93752
2010-01-18 19:35:47 +00:00
Mike Stump 211ed4826e Silence a control reaches end of function warning. Patch by Enea
Zaffanella.

llvm-svn: 93743
2010-01-18 18:41:43 +00:00
Douglas Gregor c9b7a59b30 Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).

llvm-svn: 93733
2010-01-18 18:04:31 +00:00
Daniel Dunbar e3b3d7a5e4 Fix race condition in creating objdir.
llvm-svn: 93730
2010-01-18 17:52:37 +00:00
Douglas Gregor 8c94086c90 Encoding calling conventions in the type system, from Charles Davis!
llvm-svn: 93726
2010-01-18 17:14:39 +00:00
Zhongxing Xu 228b0d4def Add support for computing size in elements for symbolic regions obtained from
malloc().

llvm-svn: 93722
2010-01-18 08:54:31 +00:00
Sam Weinig d01101e2d7 Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr.
llvm-svn: 93658
2010-01-16 21:21:01 +00:00
Douglas Gregor f5974fa0d5 When we are instantiating a member function of a local class, be sure
to merge the local instantiation scope with the outer local
instantiation scope, so that we can instantiate declarations from the
function owning the local class. Fixes an assert while instantiating
Boost.MPL's BOOST_MPL_ASSERT_MSG.

llvm-svn: 93651
2010-01-16 20:21:20 +00:00
Douglas Gregor 071676f422 Improve location information for Objective-C category declarations. We
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.

The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.

llvm-svn: 93639
2010-01-16 16:38:58 +00:00
Douglas Gregor 002b671055 Keep track of the source locations for each protocol reference in
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.

llvm-svn: 93636
2010-01-16 15:02:53 +00:00
Ted Kremenek 4ba5263441 Remove 'default' case in switch statement in clang_getCursorKindSpelling(). This identified a missing case (warned by the compiler) and identified that CXCursor_FirstDecl didn't actually correspond to the first decl.
llvm-svn: 93622
2010-01-16 02:02:09 +00:00
Tanya Lattner 68c7113944 The codegen for these builtins was removed long ago, but their definitions remained. Removing them totally.
llvm-svn: 93607
2010-01-16 01:10:51 +00:00
Douglas Gregor c58d05bcf9 Make CXCursor's data opaque.
llvm-svn: 93561
2010-01-15 21:56:13 +00:00
John McCall 9751396d70 Preserve type source information in explicit cast expressions.
Patch by Enea Zaffanella.

llvm-svn: 93522
2010-01-15 18:39:57 +00:00
Ken Dyck 02990837ad Convert the type of the LValue offset variable in APValue to CharUnits, moving
the LValue-related methods of APValue out of line to avoid header file leaching.

llvm-svn: 93512
2010-01-15 12:37:54 +00:00
Ted Kremenek 959990b840 Convert a few more uses of std::string& to llvm::StringRef.
llvm-svn: 93506
2010-01-15 07:43:59 +00:00
Douglas Gregor d2e6a45722 When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.

llvm-svn: 93433
2010-01-14 17:47:39 +00:00
John McCall 4700099719 Improve overload diagnostics some more by calling out qualifier mismatches
for special diagnostics.  Unfortunately, the non-overload diagnostics are not
this good.

llvm-svn: 93420
2010-01-14 03:28:57 +00:00
John McCall a1709fd822 Improve the diagnostic for bad conversions in overload resolution to talk
about 'object argument' vs. 'nth argument'.

llvm-svn: 93395
2010-01-14 00:56:20 +00:00
John McCall e4d5432136 Perform format-expansion on %select results.
llvm-svn: 93377
2010-01-13 23:58:20 +00:00
Douglas Gregor f98e6a28e4 Banish the notion of a "rank" for code-completion results, since we
are no longer using it for anything. No intended functionality change.

llvm-svn: 93376
2010-01-13 23:51:12 +00:00
Douglas Gregor 48d462573d Code-completion for @public, @protected, @private, @package.
llvm-svn: 93361
2010-01-13 21:54:15 +00:00
Douglas Gregor f193416359 Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).

llvm-svn: 93354
2010-01-13 21:24:21 +00:00
John McCall e8595036c4 Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.

llvm-svn: 93344
2010-01-13 20:03:27 +00:00
Ted Kremenek e14e372b67 Add 'referringDecl' field to CXCursor to prepare the way to better model declaration references from other delcarations.
llvm-svn: 93343
2010-01-13 19:59:20 +00:00
Fariborz Jahanian 3f7b8b274d Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).

llvm-svn: 93331
2010-01-13 18:51:17 +00:00
Douglas Gregor 9de54ea41b Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

  C(int); // constructor

and

  C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

  C::C C::f(int); // error: C::C refers to the constructor name, but
                  // we complain nicely and recover by treating it as
                  // a type.

llvm-svn: 93322
2010-01-13 17:31:36 +00:00
Alexis Hunt c88db06565 Implement semantic checking for C++ literal operators.
This now rejects literal operators that don't meet the requirements.
Templates are not yet checked for.

llvm-svn: 93315
2010-01-13 09:01:02 +00:00
Chris Lattner 3d756f1a9e diagnose invalid values of -ftabstop, patch by Christian Adaker!
llvm-svn: 93288
2010-01-13 03:06:50 +00:00
Mike Stump 1bacb81d6f Add an unreachable code checker.
llvm-svn: 93287
2010-01-13 02:59:54 +00:00
Daniel Dunbar 4f2bc55d4e cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
clang -cc1 logic for running an action against a set of options.
 - This should make it easier to build tools that have a clang -cc1 like
   interface, but aren't actually part of clang -cc1.

llvm-svn: 93282
2010-01-13 00:48:06 +00:00
John McCall e1ac8d1742 Improve the reporting of non-viable overload candidates by noting the reason
why the candidate is non-viable.  There's a lot we can do to improve this, but
it's a good start.  Further improvements should probably be integrated with the
bad-initialization reporting routines.

llvm-svn: 93277
2010-01-13 00:25:19 +00:00
Ted Kremenek cb674f9492 Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl instead of a CXEntity.
Enhance USR generation a bit with support for records.

llvm-svn: 93267
2010-01-12 23:33:42 +00:00
Douglas Gregor 49862b8285 Don't emit string-comparison or self-comparison warnings in
unevaluated contexts, because they only matter for code that will
actually be evaluated at runtime.

As part of this, I had to extend PartialDiagnostic to support fix-it
hints.

llvm-svn: 93266
2010-01-12 23:18:54 +00:00
Douglas Gregor 18473f329d Improve recovery for template-ids whose template-name doesn't actually
name a template, when they occur in a base-specifier. This is one of
the (few) places where we know for sure that an identifier followed by
a '<' must be a template name, so we can diagnose and recover well:

test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing
'template'
      keyword prior to dependent template name 'T::apply'
struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ...
               ^
               template 
test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown
template name
      'vector'
struct X2 : vector<T> { }; // expected-error{{unknown template name
'vector'}}
            ^
2 diagnostics generated.

llvm-svn: 93257
2010-01-12 21:28:44 +00:00
Chris Lattner faa5417264 implement PR6004, warning about divide and remainder by zero.
llvm-svn: 93256
2010-01-12 21:23:57 +00:00
Chris Lattner 20aee9b914 implement PR6007, diagnosing invalid attribute((section))
llvm-svn: 93255
2010-01-12 20:58:53 +00:00
Chandler Carruth 04bdce6407 Fix the CodeGen half of PR5911 by changing reference initialization to
correctly look through arrays to see cv-qualifiers. Also enhances the routine
for doing this to preserve more type sugaring for diagnostics.

llvm-svn: 93252
2010-01-12 20:32:25 +00:00
John McCall 53262c96d9 Reorganize some of the code to note overload candidates. Improves the
fidelity with which we note them as functions/constructors and templates
thereof.  Also will be helpful when reporting bad conversions (next).

llvm-svn: 93224
2010-01-12 02:15:36 +00:00
Ted Kremenek 87be3617e3 Change clang_getUSR() to return a CXString instead of a 'const char *'.
llvm-svn: 93213
2010-01-12 00:38:53 +00:00
Ted Kremenek e5f86be138 CIndex:
- Remove unused (and unimplemented) clang_getDeclarationName().
- Remove unused (and unimplemented) clang_getEntity().
- Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity)
- Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl).

llvm-svn: 93209
2010-01-11 23:56:39 +00:00
Benjamin Kramer 0129bd7432 Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).
llvm-svn: 93175
2010-01-11 19:46:28 +00:00
Ken Dyck de37a67f50 Change return type of getObjCEncodingTypeSize() to CharUnits as the units are in characters.
llvm-svn: 93171
2010-01-11 19:19:56 +00:00
Douglas Gregor bb91767b82 Tighten up the "cannot return array or function type" diagnostic to
say either "array type" or "function type", whichever it is. No reason
to make the user guess.

llvm-svn: 93164
2010-01-11 18:46:21 +00:00
Douglas Gregor ea0a0a9b3f Implement name lookup for conversion function template specializations
(C++ [temp.mem]p5-6), which involves template argument deduction based
on the type named, e.g., given

  struct X { template<typename T> operator T*(); } x;

when we call

  x.operator int*();

we perform template argument deduction to determine that T=int. This
template argument deduction is needed for template specialization and
explicit instantiation, e.g.,

  template<> X::operator float*() { /* ... */ }

and when calling or otherwise naming a conversion function (as in the
first example). 

This fixes PR5742 and PR5762, although there's some remaining ugliness
that's causing out-of-line definitions of conversion function
templates to fail. I'll look into that separately.

llvm-svn: 93162
2010-01-11 18:40:55 +00:00
Ken Dyck 40775003e6 Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate. 

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, 
fromQuantity(), and getQuantity() for clarity.

llvm-svn: 93153
2010-01-11 17:06:35 +00:00
Sebastian Redl 9a8dd0db89 Make Clang complain about taking the address of an unqualified member function. Fixes PR5985.
llvm-svn: 93150
2010-01-11 15:56:56 +00:00
Ted Kremenek be909b5eff Switch RegionStore over to using <BaseRegion+raw offset> to store
value bindings.  Along with a small change to OSAtomicChecker, this
resolves <rdar://problem/7527292> and resolves some long-standing
issues with how values can be bound to the same physical address by
not have the same "key".  This change is only a beginning; logically
RegionStore needs to better handle loads from addresses where the
stored value is larger/smaller/different type than the loaded value.
We handle these cases in an approximate fashion now (via
CastRetrievedVal and help in SimpleSValuator), but it could be made
much smarter.

llvm-svn: 93137
2010-01-11 02:33:26 +00:00
Alexis Hunt 91b78382b5 Do not parse hexadecimal floating point literals in C++0x mode because they are
incompatible with user-defined literals, specifically with the following form:

  0x1p+1

The preprocessing-number token extends only as far as the 'p'; the '+' is not
included. Previously we could get away with this extension as p was an invalid
suffix, but now with user-defined literals, 'p' might well be a valid suffix
and we are forced to consider it as such.

This patch also adds a warning in non-0x C++ modes telling the user that
this extension is incompatible with C++0x that is enabled by default
(previously and with other languages, we warn only with a compliance
option such as -pedantic).

llvm-svn: 93135
2010-01-10 23:37:56 +00:00
Douglas Gregor 504a6ae83e Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

  static_cast<type>(expr)

when we can have an expression, or

  using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.

llvm-svn: 93134
2010-01-10 23:08:15 +00:00
Anton Korobeynikov 3d364fddda Make clone() method out-of-line for Attr classes.
llvm-svn: 93120
2010-01-10 14:38:13 +00:00
Anton Korobeynikov 55bcea1e65 Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
 2. Add helper class for codegen of target attributes

As a proof-of-concept - implement msp430's 'interrupt' attribute.

llvm-svn: 93118
2010-01-10 12:58:08 +00:00
Chris Lattner d081f8c851 stringref'ize a bunch of filename handling logic. Much
nicer than passing around two const char*'s.

llvm-svn: 93094
2010-01-10 01:35:12 +00:00
Chris Lattner 2ceb625f59 implement rdar://7520940: published framework headers should
import other headers within the same framework with the full
framework path, not with a relative include.

llvm-svn: 93083
2010-01-10 00:24:58 +00:00
Chris Lattner e23003d1f1 implement -ftabstop=width, patch by Christian Adåker
llvm-svn: 93078
2010-01-09 21:54:33 +00:00
Chris Lattner 5ed4390474 make missing prototypes warn by default in c99 mode like GCC does,
rdar://7083878

llvm-svn: 93073
2010-01-09 20:43:38 +00:00
Benjamin Kramer 2d6fda3205 Use MacroBuilder for TargetDefines instead of std::vector.
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Benjamin Kramer 3f6323dea5 Move MacroBuilder into Frontend/Utils.h and clean it up a bit.
llvm-svn: 93057
2010-01-09 17:43:21 +00:00
Zhongxing Xu f1eeb78ffc When binding an rvalue to a reference, create a temporary object. Use
CXXObjectRegion to represent it. 

In Environment, lookup a literal expression before make up a value for it.

llvm-svn: 93047
2010-01-09 09:16:47 +00:00
Ted Kremenek ea903067e1 For now, add back clang_getDeclSource().
llvm-svn: 93003
2010-01-08 17:11:32 +00:00