Alexis Hunt
96d5c76498
Added rudimentary C++0x attribute support.
...
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)
llvm-svn: 89543
2009-11-21 08:43:09 +00:00
John Thompson
c1b70ab9b8
Revised Win32 include path to search highest version in registry, plus platform SDK path
...
llvm-svn: 89517
2009-11-21 00:15:52 +00:00
Daniel Dunbar
2eaef18e76
Fix refactoro, clang-cc wasn't properly reporting errors when opening an output file failed.
...
llvm-svn: 89502
2009-11-20 22:32:38 +00:00
Daniel Dunbar
69fd86dd44
Add clang -cc1 parsing of CodeGenOptions.
...
llvm-svn: 89464
2009-11-20 17:23:30 +00:00
Daniel Dunbar
84e8a249fa
Fix some default in the option classes, and some CompilerInvocation argification
...
errors.
llvm-svn: 89388
2009-11-19 20:54:59 +00:00
Ken Dyck
0138b9e1db
Define __WCHAR_WIDTH__ for use in stdint.h.
...
llvm-svn: 89353
2009-11-19 15:47:58 +00:00
Ken Dyck
a1f677c3d1
Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
...
stdint.h.
llvm-svn: 89348
2009-11-19 14:16:57 +00:00
Ken Dyck
575128656e
Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.
...
llvm-svn: 89346
2009-11-19 13:42:09 +00:00
Ken Dyck
9b25f781c5
Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
...
__INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all
could potentially be in use in the wild. My apologies.
llvm-svn: 89345
2009-11-19 13:18:59 +00:00
Ken Dyck
f982fc0b23
Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
...
replaced with __PTRDIFF_WIDTH__.
llvm-svn: 89344
2009-11-19 12:37:14 +00:00
Ken Dyck
056efe0fc7
Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.
...
llvm-svn: 89342
2009-11-19 12:21:52 +00:00
Ken Dyck
cc11129fda
Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
...
__INTPTR_WIDTH__ instead.
llvm-svn: 89340
2009-11-19 12:15:31 +00:00
Daniel Dunbar
51cd8f085f
Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
...
llvm-svn: 89333
2009-11-19 07:37:51 +00:00
Daniel Dunbar
da9e8e225d
clang-cc: Remove some more llvm: 🆑 :init arguments, by only setting values when
...
the argument is given.
Also, tweak Opt.Sysroot defaulting.
llvm-svn: 89318
2009-11-19 05:32:21 +00:00
Daniel Dunbar
d80277895d
Change -code-completion-debug-printer to -no-code-completion-debug-printer.
...
Also, tweak a few help strings and update CompilerInvocation serialization for prev change.
llvm-svn: 89317
2009-11-19 05:32:09 +00:00
Ken Dyck
24cfcf15c3
Predefine __INTPTR_WIDTH__ for future use in stdint.h.
...
llvm-svn: 89231
2009-11-18 20:05:48 +00:00
Ken Dyck
fa01168a5c
Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are no
...
longer used by stdint.h.
llvm-svn: 89230
2009-11-18 19:51:06 +00:00
Daniel Dunbar
f2ce9a217d
Use llvm::sys::Path to check isAbsolute, instead of hard coding. Also, remove random FIXME (?).
...
llvm-svn: 89229
2009-11-18 19:50:41 +00:00
Ken Dyck
c0c98291e0
Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
...
stdint.h.
llvm-svn: 89203
2009-11-18 13:52:57 +00:00
Ted Kremenek
9b124e10a4
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class .
...
llvm-svn: 89170
2009-11-18 00:28:11 +00:00
Ted Kremenek
a26da8503c
Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().
...
llvm-svn: 89162
2009-11-17 23:12:20 +00:00
Nuno Lopes
b9ac1dc910
recognize .hpp as c++ (needed for ./configure'ing boost)
...
llvm-svn: 89100
2009-11-17 15:36:35 +00:00
Nuno Lopes
11ab472ba1
add Fedora 11 include path. what a crap..
...
llvm-svn: 89098
2009-11-17 15:28:35 +00:00
Daniel Dunbar
aca02c2730
Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.
...
llvm-svn: 89074
2009-11-17 09:15:57 +00:00
Daniel Dunbar
4656c53e12
Move -fnext-runtime defaulting to driver (and change clang-cc default to
...
-fnext-runtime), instead of using getDefaultLangOptions.
llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Douglas Gregor
120f6a6675
Silence some warnings produced by Clang, and add a missing header
...
llvm-svn: 89051
2009-11-17 06:14:37 +00:00
Daniel Dunbar
629f6bb95d
Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
...
- Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.
llvm-svn: 89049
2009-11-17 06:02:29 +00:00
Daniel Dunbar
d6ea9028e7
Simplify PreprocessorOptions, it doesn't need abstracted field access.
...
llvm-svn: 89047
2009-11-17 05:52:41 +00:00
Daniel Dunbar
92881dbe73
Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.
...
llvm-svn: 89035
2009-11-17 05:04:15 +00:00
Daniel Dunbar
24347f7cda
Store more information in HeaderSearchOptions so that its initialization is not
...
language dependent.
llvm-svn: 88981
2009-11-16 22:38:40 +00:00
Douglas Gregor
1b8fe5b716
First part of changes to eliminate problems with cv-qualifiers and
...
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
typedef const int CInt;
typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:
- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to
Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969
2009-11-16 21:35:15 +00:00
Rafael Espindola
abab87936e
Use configure options for searching for libstdc++.
...
llvm-svn: 88945
2009-11-16 19:49:37 +00:00
Ken Dyck
2dc8d5fa3e
Parameterize the constant-generating macros in stdint.h with new built-in
...
__INTn_C_SUFFIX__ macros that are defined for types with corresponding
constant suffixes (i.e. long and long long).
llvm-svn: 88914
2009-11-16 16:36:33 +00:00
Daniel Dunbar
b9bbd54fdb
Add TargetOptions and use it when constructing targets.
...
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
llvm-svn: 88833
2009-11-15 06:48:46 +00:00
Daniel Dunbar
883578060f
Add FrontendActions for all preprocessor based clang-cc actions.
...
llvm-svn: 88774
2009-11-14 10:42:57 +00:00
Daniel Dunbar
02bd2d7281
Add FrontendActions, which provides a FrontendAction interface to all the existing AST consumer based clang-cc actions.
...
llvm-svn: 88773
2009-11-14 10:42:46 +00:00
Daniel Dunbar
a0ff58dadf
Add FrontendAction interface, for encapsulating a "clang-cc" style action.
...
llvm-svn: 88772
2009-11-14 10:42:35 +00:00
Daniel Dunbar
1b39a2edff
Shuffle VerifyDiagnosticsClient API to be less fragile.
...
llvm-svn: 88765
2009-11-14 07:53:24 +00:00
Daniel Dunbar
409e890f8d
Add CompilerInstance::InitializeSourceManager.
...
llvm-svn: 88764
2009-11-14 07:53:04 +00:00
Daniel Dunbar
50ec0da0e1
Switch -verify implementation to use VerifyDiagnosticClient.
...
- Not tested, but -verify with multiple inputs should work now.
llvm-svn: 88750
2009-11-14 03:24:39 +00:00
Daniel Dunbar
348185548e
Add VerifyDiagnosticsClient, to replace old -verify.
...
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.
- This also tweaks a few things:
o Errors are now just regular diagnostics.
o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.
- Not yet used.
llvm-svn: 88748
2009-11-14 03:23:19 +00:00
Daniel Dunbar
56d9c293db
Add ASTConsumer to CompilerInstance.
...
llvm-svn: 88743
2009-11-14 02:47:17 +00:00
Daniel Dunbar
e01dc86d2a
Move CompilerInstance::set* methods out-of-line.
...
llvm-svn: 88731
2009-11-14 01:20:40 +00:00
Ted Kremenek
4ef13f8ac9
Add clang-cc option "--analyzer-experimental-internal-checks". This
...
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.
llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Daniel Dunbar
420b0f1bd8
Add CompilerInstance utility functions for creating output files.
...
llvm-svn: 88667
2009-11-13 18:32:08 +00:00
Daniel Dunbar
045f917edc
Remove local splitLines reimplementation.
...
llvm-svn: 88661
2009-11-13 16:46:11 +00:00
Daniel Dunbar
566eeb2da5
Add output file list to CompilerInstance, so that it can track them instead of
...
forcing all clients to do it.
llvm-svn: 87103
2009-11-13 10:37:48 +00:00
Daniel Dunbar
f7093b5ae8
Add CodeCompletion consumer to CompilerInvocation.
...
llvm-svn: 87100
2009-11-13 09:36:05 +00:00
Daniel Dunbar
599313ef94
Add CompilerInstance::createPCHExternalASTSource.
...
llvm-svn: 87097
2009-11-13 08:21:10 +00:00
Daniel Dunbar
df3e30c41c
Add ASTContext to CompilerInstance.
...
llvm-svn: 87095
2009-11-13 08:20:47 +00:00