Commit Graph

16712 Commits

Author SHA1 Message Date
Edward O'Callaghan 9dda8e98d4 The AuroraUX toolchain has conflicting wchar_t between the system stdlib.h header and the clang stddef.h header where clang was defining as int where we use long.
llvm-svn: 84416
2009-10-18 13:33:59 +00:00
Benjamin Kramer 6c839f827c Use sys::Path::eraseFromDisk instead of unlink as suggested by Chris.
llvm-svn: 84415
2009-10-18 11:34:14 +00:00
Benjamin Kramer 2836c4ccb6 CIndex: replace fork/exec with our portable ExecuteAndWait wrapper.
llvm-svn: 84414
2009-10-18 11:19:36 +00:00
Benjamin Kramer 817e7e4fb8 CIndex: avoid a dangling pointer issue.
llvm-svn: 84413
2009-10-18 11:10:55 +00:00
John McCall cebee16bc0 When performing template-substitution into a type, don't just replace the
TemplateTypeParmType with the substituted type directly;  instead, replace it
with a SubstTemplateTypeParmType which will note that the type was originally
written as a template type parameter.  This makes it reasonable to preserve
source information even through template substitution.

Also define the new SubstTemplateTypeParmType class, obviously.

For consistency with current behavior, we stringize these types as if they
were the underlying type.  I'm not sure this is the right thing to do.
At any rate, I paled at adding yet another clause to the don't-desugar 'if'
statement, so I extracted a function to do it.  The new function also does
The Right Thing more often, I think:  e.g. if we have a chain of typedefs
leading to a vector type, we will now desugar all but the last one.

llvm-svn: 84412
2009-10-18 09:09:24 +00:00
Zhongxing Xu 775a2c08c8 use DenseSet instead of SmallSet.
llvm-svn: 84398
2009-10-18 04:15:47 +00:00
Daniel Dunbar 0013afb6ac Add NameDecl::getName() -> StringRef.
llvm-svn: 84394
2009-10-18 02:09:45 +00:00
Daniel Dunbar c04294035f Add another two ExtVectorComponent FIXMEs.
llvm-svn: 84393
2009-10-18 02:09:38 +00:00
Daniel Dunbar ce5a0b3deb Switch ExtVectorElementExpr::getEncodedElementAccess to use StringRef.
- Really this should be simplified by the FIXME above, but I'm too deep in DFS.

llvm-svn: 84392
2009-10-18 02:09:31 +00:00
Daniel Dunbar afff4340d5 Simplify HandleModeAttr.
llvm-svn: 84391
2009-10-18 02:09:24 +00:00
Daniel Dunbar ccbd9a46e7 Simplify HandleFormatAttr.
- I have this crazy dream that one day someone will invent a miraculous tool so
   that developers, instead of hand optimizing their source code to obscure its
   intent and decrease its maleability, will instead write what they mean, and
   this strange and wonderful tool -- which I imagine would be called something
   fancy sounding like "an optimizing compiler" -- will make their code fast
   *for* them. With all the saved time, developers could maybe even focus on
   making the magic "optimizing compiler" better!!

 - No intended functionality change, all though I expect the universe to mock me
   for snarkiness.

llvm-svn: 84390
2009-10-18 02:09:17 +00:00
Daniel Dunbar cb2a056980 Add FIXME... maybe Nate will get bored? :)
llvm-svn: 84389
2009-10-18 02:09:09 +00:00
Daniel Dunbar b0e1c2bab5 Grammaro.
llvm-svn: 84388
2009-10-18 02:09:02 +00:00
John McCall 1700197e65 Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc.  Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.

Handle all cases in PCH.  Handle a few more cases when inserting
location information in SemaType.

It should be extremely straightforward to add new location information
to existing TypeLoc objects now.

llvm-svn: 84386
2009-10-18 01:05:36 +00:00
Daniel Dunbar cd23718ca1 Attempt to unbreak the MSVC build.
llvm-svn: 84381
2009-10-17 23:53:11 +00:00
Daniel Dunbar 125c9c98f7 Simplify ExtVectorElementExpr::containsDuplicateElements().
llvm-svn: 84380
2009-10-17 23:53:04 +00:00
Daniel Dunbar fe66bf79a0 Add FIXME.
llvm-svn: 84379
2009-10-17 23:52:58 +00:00
Daniel Dunbar ebd5b4a3aa Avoid std::string concatenation.
llvm-svn: 84378
2009-10-17 23:52:50 +00:00
Daniel Dunbar cfae9d53a5 StringRefize some parts of Diagnostic API.
llvm-svn: 84377
2009-10-17 23:52:43 +00:00
Daniel Dunbar 4a1669853f Remove unused BernsteinHash functions.
llvm-svn: 84376
2009-10-17 23:52:36 +00:00
Daniel Dunbar f8502d50f7 Switch to llvm::HashString.
llvm-svn: 84375
2009-10-17 23:52:28 +00:00
Nuno Lopes 24241d249e add gentoo x86 2009.1 (gcc 4.3.4) include paths
llvm-svn: 84371
2009-10-17 23:11:14 +00:00
Douglas Gregor 0b3d95ae64 Fix a crash with qualified member access into a non-type, from Sean Hunt!
llvm-svn: 84370
2009-10-17 22:37:54 +00:00
Daniel Dunbar a1944d704e Describe/link some of the universal driver related work.
llvm-svn: 84369
2009-10-17 22:08:19 +00:00
Daniel Dunbar d512efa6d2 Add a "Universal Driver" open project, and web page.
llvm-svn: 84366
2009-10-17 21:50:11 +00:00
Douglas Gregor 4bbd1acf8b When type-checking a C++ "new" expression, don't type-check the actual
initialization if any of the constructor/initialization arguments are
type-dependent. Fixes PR5224.

llvm-svn: 84365
2009-10-17 21:40:42 +00:00
Sebastian Redl df4b80e7c0 When resolving the address of an overloaded function or function template, mark the result as referenced.
The most important effect of this is that function templates only referenced by address expressions now get instantiated. This, in turn, means that Hello World compiles with the Apache stdcxx library even when using endl.

llvm-svn: 84363
2009-10-17 21:12:09 +00:00
Sebastian Redl fef1c0d54f Don't add implicit casts of explicit address-taking of overloaded functions.
Taking the address of an overloaded function with an explicit address-of operator wrapped the operator in an implicit cast that added yet another pointer level, leaving us with a corrupted AST, which crashed CodeGen in the test case I've added. Fix this by making FixOverloadedFunctionReference return whether there was an address-of operator and not adding the implicit cast in that case.

llvm-svn: 84362
2009-10-17 20:50:27 +00:00
Daniel Dunbar 98dd6d2927 Add IdentifierTable::CreateIdentifierInfo(StringRef).
llvm-svn: 84361
2009-10-17 20:44:06 +00:00
Daniel Dunbar 283ccf4342 Use StringExtra's HashString instead of BernsteinHash.
llvm-svn: 84360
2009-10-17 20:43:58 +00:00
Daniel Dunbar bf4ca909e0 Add an open project. :)
llvm-svn: 84359
2009-10-17 20:43:50 +00:00
Chris Lattner 9b24e8aba6 daniel really wants this in the testsuite.
llvm-svn: 84354
2009-10-17 20:37:18 +00:00
Chris Lattner ec3a1565f6 teach getCorrespondingUnsignedType how to handle vectors of integers,
fixing PR4838.

llvm-svn: 84353
2009-10-17 20:33:28 +00:00
Sebastian Redl 548e629e02 In some dependent contexts, incomplete array types persist into FinalizeDeclaratorGroup. Don't require them to have a complete type. This allows us to compile Hello World with the Apache stdcxx library. If you don't use endl, it even links and runs.
llvm-svn: 84347
2009-10-17 19:37:06 +00:00
Edward O'Callaghan 93135aad29 Fix for PR5190, Credit to Zhanyong Wan.
llvm-svn: 84346
2009-10-17 19:32:54 +00:00
Sebastian Redl 5371aed18c Add a DR437 testcase, but disable it for now, since it fails.
llvm-svn: 84345
2009-10-17 18:31:05 +00:00
Daniel Dunbar 1c0761d6e9 Avoid std::string thrashing in MultiKeywordSelector::getName(), and simplify.
llvm-svn: 84343
2009-10-17 18:13:02 +00:00
Daniel Dunbar acb5a4b57c Simplify more.
llvm-svn: 84342
2009-10-17 18:12:53 +00:00
Daniel Dunbar 9d9aa167e6 Simplify.
llvm-svn: 84341
2009-10-17 18:12:45 +00:00
Daniel Dunbar e81a553162 Use raw_ostream instead of C stdio.
llvm-svn: 84340
2009-10-17 18:12:37 +00:00
Daniel Dunbar 5bf78579bd Rewrite AttributeList::getKind to use StringRef API.
llvm-svn: 84339
2009-10-17 18:12:29 +00:00
Daniel Dunbar 403073e471 Simplify.
llvm-svn: 84338
2009-10-17 18:12:21 +00:00
Daniel Dunbar e36337910f Use raw_ostream for formatting integers, and use IdentifierInfo::getNameStr
instead of getName.
 - -2 FIXMEs.

llvm-svn: 84337
2009-10-17 18:12:14 +00:00
Ted Kremenek 9f3a643bad Minor cleanup: move typedef out of anonymous namespace (which now contains nothing) and into RemoveDeadBindings. No functionality change.
llvm-svn: 84335
2009-10-17 17:45:11 +00:00
Douglas Gregor 4505315726 Write the preprocessor block after we write out types + declarations,
so that we catch any macros used within the declarations and types. 

Also, properly store a NULL selector.

llvm-svn: 84334
2009-10-17 17:25:45 +00:00
Daniel Dunbar 1d4172c52b Suppress -Asserts warning.
llvm-svn: 84329
2009-10-17 09:39:30 +00:00
Daniel Dunbar 19a203965f Remove a FIXME that doesn't belong, there are numerous other places that use
alignment in bits in clang. If we really want to fix this, it should be a bugzilla.

llvm-svn: 84328
2009-10-17 09:38:57 +00:00
Daniel Dunbar f997f1e896 Simplify (move guard to caller instead of callee).
llvm-svn: 84325
2009-10-17 09:04:56 +00:00
Zhongxing Xu c0c6508981 Per discussion with Ted, the 'FromSuper'/'FromSub' logic is invalid. Simplify
the code to standard worklist algorithm. Always add both sub and super 
regions of live regions.

llvm-svn: 84323
2009-10-17 08:39:24 +00:00
Ted Kremenek 1baf407fbc Fix another static analyzer crash due to a corner case in "folding" symbolic values that are constrained to be a constant.
llvm-svn: 84320
2009-10-17 07:39:35 +00:00