]> granicus.if.org Git - clang/log
clang
15 years agoThe constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit...
Ted Kremenek [Mon, 19 Oct 2009 21:44:57 +0000 (21:44 +0000)]
The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit to specify
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding
DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object
is destroyed.

The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences
diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes
<rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84539 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the built-in candidate set reduction hueristic
Fariborz Jahanian [Mon, 19 Oct 2009 21:30:45 +0000 (21:30 +0000)]
Add the built-in candidate set reduction hueristic
to '+=', '-=', '*=' and '/=' builtin operators and
fixes a logic bug exposed by doing this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84538 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-order includes so that the logic involving '#ifdef LLVM_ON_WIN32' appears after...
Ted Kremenek [Mon, 19 Oct 2009 21:17:25 +0000 (21:17 +0000)]
Re-order includes so that the logic involving '#ifdef LLVM_ON_WIN32' appears after the main #includes.  The ultimate solution is to just use LLVM-portable methods in llvm/System.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84534 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCopy conversion of an expression to its base class
Fariborz Jahanian [Mon, 19 Oct 2009 19:18:20 +0000 (19:18 +0000)]
Copy conversion of an expression to its base class
is a standard convesion and not a user-defined
conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84525 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle emitting the assignment operator when the lhs is a reference. Fixes PR5227.
Anders Carlsson [Mon, 19 Oct 2009 18:28:22 +0000 (18:28 +0000)]
Handle emitting the assignment operator when the lhs is a reference. Fixes PR5227.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84518 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet the cast kind to CK_NoOp for C-style casts that are really const casts. Fixes...
Anders Carlsson [Mon, 19 Oct 2009 18:14:28 +0000 (18:14 +0000)]
Set the cast kind to CK_NoOp for C-style casts that are really const casts. Fixes PR5248.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84514 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.
Steve Naroff [Mon, 19 Oct 2009 14:34:22 +0000 (14:34 +0000)]
Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.

Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange indenting for case/compound statements to conform to the rest of clang.
Steve Naroff [Mon, 19 Oct 2009 13:41:39 +0000 (13:41 +0000)]
Change indenting for case/compound statements to conform to the rest of clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84498 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: make variable non-static to avoid potential race conditions, per
Benjamin Kramer [Mon, 19 Oct 2009 10:20:24 +0000 (10:20 +0000)]
CIndex: make variable non-static to avoid potential race conditions, per
Daniel's comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84484 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWorkaround a bug exposed by the FileCheckify of message-length.c, the caret end
Daniel Dunbar [Mon, 19 Oct 2009 09:11:21 +0000 (09:11 +0000)]
Workaround a bug exposed by the FileCheckify of message-length.c, the caret end
column computation isn't correct and could exceed the line length, which
resulted in a buffer overflow later.
 - Chris, is there a better way for this code to compute the final column used
   by the caret?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84475 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAuroraUX toolchain should call GNU assembler not the Solaris assembler.
Edward O'Callaghan [Mon, 19 Oct 2009 07:02:08 +0000 (07:02 +0000)]
AuroraUX toolchain should call GNU assembler not the Solaris assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84469 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert this to FileCheck, PR5232
Chris Lattner [Mon, 19 Oct 2009 06:45:49 +0000 (06:45 +0000)]
convert this to FileCheck, PR5232

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84466 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid std::string concatenation.
Daniel Dunbar [Mon, 19 Oct 2009 01:21:19 +0000 (01:21 +0000)]
Avoid std::string concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84458 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate NamedDecl::getName() to work for empty names.
Daniel Dunbar [Mon, 19 Oct 2009 01:21:12 +0000 (01:21 +0000)]
Update NamedDecl::getName() to work for empty names.
 - I'm not sure this is ideal, but otherwise clients must be overly careful when handling decl's which can have empty names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84457 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTwinify CodeGenFunction::CreateTempAlloca
Daniel Dunbar [Mon, 19 Oct 2009 01:21:05 +0000 (01:21 +0000)]
Twinify CodeGenFunction::CreateTempAlloca

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84456 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ObjCImplementationDecl::getName() for consistency, with FIXME.
Daniel Dunbar [Mon, 19 Oct 2009 01:20:57 +0000 (01:20 +0000)]
Add ObjCImplementationDecl::getName() for consistency, with FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84455 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd FIXME calling for rename of NamedDecl::getNameAsString.
Daniel Dunbar [Mon, 19 Oct 2009 01:20:50 +0000 (01:20 +0000)]
Add FIXME calling for rename of NamedDecl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84454 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSuppress build warning.
Daniel Dunbar [Mon, 19 Oct 2009 01:20:42 +0000 (01:20 +0000)]
Suppress build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84453 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen binding a reference to a temporary, it's important that other temporaries create...
Anders Carlsson [Sun, 18 Oct 2009 23:09:21 +0000 (23:09 +0000)]
When binding a reference to a temporary, it's important that other temporaries created as on the RHS are destroyed before emitting the dtor for the temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84451 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix tyop noticed by Sean Hunt.
Anders Carlsson [Sun, 18 Oct 2009 22:10:32 +0000 (22:10 +0000)]
Fix tyop noticed by Sean Hunt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84449 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen building a cast argument, make sure to bind the result to a temporary.
Anders Carlsson [Sun, 18 Oct 2009 21:20:14 +0000 (21:20 +0000)]
When building a cast argument, make sure to bind the result to a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84448 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
Daniel Dunbar [Sun, 18 Oct 2009 21:17:35 +0000 (21:17 +0000)]
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert temporaries.cpp to using FileCheck.
Anders Carlsson [Sun, 18 Oct 2009 21:11:11 +0000 (21:11 +0000)]
Convert temporaries.cpp to using FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84446 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test for OpenCL vector initializer codegen
Nate Begeman [Sun, 18 Oct 2009 21:04:35 +0000 (21:04 +0000)]
Add test for OpenCL vector initializer codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84445 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename temp-1.cpp to temporaries.cpp.
Anders Carlsson [Sun, 18 Oct 2009 20:58:38 +0000 (20:58 +0000)]
Rename temp-1.cpp to temporaries.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84443 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTwinify CGObjCMac, this simplifies the code and should reduce std::string
Daniel Dunbar [Sun, 18 Oct 2009 20:48:59 +0000 (20:48 +0000)]
Twinify CGObjCMac, this simplifies the code and should reduce std::string
trashing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84439 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse CK_BitCast for member function pointer casts. Fixes PR5138.
Anders Carlsson [Sun, 18 Oct 2009 20:31:03 +0000 (20:31 +0000)]
Use CK_BitCast for member function pointer casts. Fixes PR5138.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove misc clients to IdentifierInfo StringRef API.
Daniel Dunbar [Sun, 18 Oct 2009 20:26:27 +0000 (20:26 +0000)]
Move misc clients to IdentifierInfo StringRef API.
 - strcmp -> ==
 - OS.write(II->getName() ...) -> OS << II->getNameStr()
 - Avoid std::string concatenation
 - Use getNameStr().str() when an std::string is really needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove clients to use IdentifierInfo::getNameStart() instead of getName()
Daniel Dunbar [Sun, 18 Oct 2009 20:26:12 +0000 (20:26 +0000)]
Move clients to use IdentifierInfo::getNameStart() instead of getName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.
Daniel Dunbar [Sun, 18 Oct 2009 20:25:46 +0000 (20:25 +0000)]
Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84435 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport IRgen of OpenCL vector initializers, ensuring the resulting IR is in a
Nate Begeman [Sun, 18 Oct 2009 20:10:40 +0000 (20:10 +0000)]
Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in a
form that LLVM code generators can turn into efficient code.  For example,
int4 a, b, c;
a = (int4)(b.yzw, a.x)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84434 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTry to unbreak MSVC build.
Benjamin Kramer [Sun, 18 Oct 2009 19:59:44 +0000 (19:59 +0000)]
Try to unbreak MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84433 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIt's OK for a pure virtual function to override another pure virtual function. Fixes...
Anders Carlsson [Sun, 18 Oct 2009 19:34:08 +0000 (19:34 +0000)]
It's OK for a pure virtual function to override another pure virtual function. Fixes PR5222.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84428 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd FloatingCast to getCastKindName's list.
Benjamin Kramer [Sun, 18 Oct 2009 19:02:15 +0000 (19:02 +0000)]
Add FloatingCast to getCastKindName's list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84427 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agonon-POD members => make it a class (also silences MSVC warnings)
Benjamin Kramer [Sun, 18 Oct 2009 18:56:13 +0000 (18:56 +0000)]
non-POD members => make it a class (also silences MSVC warnings)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84426 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some more cast kinds.
Anders Carlsson [Sun, 18 Oct 2009 18:12:03 +0000 (18:12 +0000)]
Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: fix typo.
Benjamin Kramer [Sun, 18 Oct 2009 16:52:07 +0000 (16:52 +0000)]
CIndex: fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84422 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissed a paren.
Benjamin Kramer [Sun, 18 Oct 2009 16:20:58 +0000 (16:20 +0000)]
Missed a paren.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84421 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: add a (untested) WIN32 codepath to get ClangPath.
Benjamin Kramer [Sun, 18 Oct 2009 16:13:48 +0000 (16:13 +0000)]
CIndex: add a (untested) WIN32 codepath to get ClangPath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84420 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: compute ClangPath lazily.
Benjamin Kramer [Sun, 18 Oct 2009 16:11:04 +0000 (16:11 +0000)]
CIndex: compute ClangPath lazily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84419 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for codegening CXXZeroInitValueExprs
Nuno Lopes [Sun, 18 Oct 2009 15:18:11 +0000 (15:18 +0000)]
add support for codegening CXXZeroInitValueExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84418 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore all the test output directories that lit generates.
Sebastian Redl [Sun, 18 Oct 2009 14:56:09 +0000 (14:56 +0000)]
Ignore all the test output directories that lit generates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84417 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe AuroraUX toolchain has conflicting wchar_t between the system stdlib.h header...
Edward O'Callaghan [Sun, 18 Oct 2009 13:33:59 +0000 (13:33 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84416 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse sys::Path::eraseFromDisk instead of unlink as suggested by Chris.
Benjamin Kramer [Sun, 18 Oct 2009 11:34:14 +0000 (11:34 +0000)]
Use sys::Path::eraseFromDisk instead of unlink as suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84415 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: replace fork/exec with our portable ExecuteAndWait wrapper.
Benjamin Kramer [Sun, 18 Oct 2009 11:19:36 +0000 (11:19 +0000)]
CIndex: replace fork/exec with our portable ExecuteAndWait wrapper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84414 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCIndex: avoid a dangling pointer issue.
Benjamin Kramer [Sun, 18 Oct 2009 11:10:55 +0000 (11:10 +0000)]
CIndex: avoid a dangling pointer issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84413 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen performing template-substitution into a type, don't just replace the
John McCall [Sun, 18 Oct 2009 09:09:24 +0000 (09:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse DenseSet instead of SmallSet.
Zhongxing Xu [Sun, 18 Oct 2009 04:15:47 +0000 (04:15 +0000)]
use DenseSet instead of SmallSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84398 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd NameDecl::getName() -> StringRef.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:45 +0000 (02:09 +0000)]
Add NameDecl::getName() -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84394 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another two ExtVectorComponent FIXMEs.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:38 +0000 (02:09 +0000)]
Add another two ExtVectorComponent FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84393 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch ExtVectorElementExpr::getEncodedElementAccess to use StringRef.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:31 +0000 (02:09 +0000)]
Switch ExtVectorElementExpr::getEncodedElementAccess to use StringRef.
 - Really this should be simplified by the FIXME above, but I'm too deep in DFS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84392 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify HandleModeAttr.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:24 +0000 (02:09 +0000)]
Simplify HandleModeAttr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84391 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify HandleFormatAttr.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:17 +0000 (02:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84390 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd FIXME... maybe Nate will get bored? :)
Daniel Dunbar [Sun, 18 Oct 2009 02:09:09 +0000 (02:09 +0000)]
Add FIXME... maybe Nate will get bored? :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84389 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGrammaro.
Daniel Dunbar [Sun, 18 Oct 2009 02:09:02 +0000 (02:09 +0000)]
Grammaro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84388 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClone the full Type hierarchy into the TypeLoc hierarchy. Normalize
John McCall [Sun, 18 Oct 2009 01:05:36 +0000 (01:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttempt to unbreak the MSVC build.
Daniel Dunbar [Sat, 17 Oct 2009 23:53:11 +0000 (23:53 +0000)]
Attempt to unbreak the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84381 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify ExtVectorElementExpr::containsDuplicateElements().
Daniel Dunbar [Sat, 17 Oct 2009 23:53:04 +0000 (23:53 +0000)]
Simplify ExtVectorElementExpr::containsDuplicateElements().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84380 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd FIXME.
Daniel Dunbar [Sat, 17 Oct 2009 23:52:58 +0000 (23:52 +0000)]
Add FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84379 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid std::string concatenation.
Daniel Dunbar [Sat, 17 Oct 2009 23:52:50 +0000 (23:52 +0000)]
Avoid std::string concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84378 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStringRefize some parts of Diagnostic API.
Daniel Dunbar [Sat, 17 Oct 2009 23:52:43 +0000 (23:52 +0000)]
StringRefize some parts of Diagnostic API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84377 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unused BernsteinHash functions.
Daniel Dunbar [Sat, 17 Oct 2009 23:52:36 +0000 (23:52 +0000)]
Remove unused BernsteinHash functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84376 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch to llvm::HashString.
Daniel Dunbar [Sat, 17 Oct 2009 23:52:28 +0000 (23:52 +0000)]
Switch to llvm::HashString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84375 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd gentoo x86 2009.1 (gcc 4.3.4) include paths
Nuno Lopes [Sat, 17 Oct 2009 23:11:14 +0000 (23:11 +0000)]
add gentoo x86 2009.1 (gcc 4.3.4) include paths

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84371 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a crash with qualified member access into a non-type, from Sean Hunt!
Douglas Gregor [Sat, 17 Oct 2009 22:37:54 +0000 (22:37 +0000)]
Fix a crash with qualified member access into a non-type, from Sean Hunt!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDescribe/link some of the universal driver related work.
Daniel Dunbar [Sat, 17 Oct 2009 22:08:19 +0000 (22:08 +0000)]
Describe/link some of the universal driver related work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84369 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a "Universal Driver" open project, and web page.
Daniel Dunbar [Sat, 17 Oct 2009 21:50:11 +0000 (21:50 +0000)]
Add a "Universal Driver" open project, and web page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84366 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen type-checking a C++ "new" expression, don't type-check the actual
Douglas Gregor [Sat, 17 Oct 2009 21:40:42 +0000 (21:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84365 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen resolving the address of an overloaded function or function template, mark the...
Sebastian Redl [Sat, 17 Oct 2009 21:12:09 +0000 (21:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't add implicit casts of explicit address-taking of overloaded functions.
Sebastian Redl [Sat, 17 Oct 2009 20:50:27 +0000 (20:50 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84362 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd IdentifierTable::CreateIdentifierInfo(StringRef).
Daniel Dunbar [Sat, 17 Oct 2009 20:44:06 +0000 (20:44 +0000)]
Add IdentifierTable::CreateIdentifierInfo(StringRef).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84361 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse StringExtra's HashString instead of BernsteinHash.
Daniel Dunbar [Sat, 17 Oct 2009 20:43:58 +0000 (20:43 +0000)]
Use StringExtra's HashString instead of BernsteinHash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84360 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an open project. :)
Daniel Dunbar [Sat, 17 Oct 2009 20:43:50 +0000 (20:43 +0000)]
Add an open project. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84359 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodaniel really wants this in the testsuite.
Chris Lattner [Sat, 17 Oct 2009 20:37:18 +0000 (20:37 +0000)]
daniel really wants this in the testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84354 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoteach getCorrespondingUnsignedType how to handle vectors of integers,
Chris Lattner [Sat, 17 Oct 2009 20:33:28 +0000 (20:33 +0000)]
teach getCorrespondingUnsignedType how to handle vectors of integers,
fixing PR4838.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84353 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn some dependent contexts, incomplete array types persist into FinalizeDeclaratorGro...
Sebastian Redl [Sat, 17 Oct 2009 19:37:06 +0000 (19:37 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84347 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR5190, Credit to Zhanyong Wan.
Edward O'Callaghan [Sat, 17 Oct 2009 19:32:54 +0000 (19:32 +0000)]
Fix for PR5190, Credit to Zhanyong Wan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a DR437 testcase, but disable it for now, since it fails.
Sebastian Redl [Sat, 17 Oct 2009 18:31:05 +0000 (18:31 +0000)]
Add a DR437 testcase, but disable it for now, since it fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84345 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid std::string thrashing in MultiKeywordSelector::getName(), and simplify.
Daniel Dunbar [Sat, 17 Oct 2009 18:13:02 +0000 (18:13 +0000)]
Avoid std::string thrashing in MultiKeywordSelector::getName(), and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84343 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify more.
Daniel Dunbar [Sat, 17 Oct 2009 18:12:53 +0000 (18:12 +0000)]
Simplify more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84342 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify.
Daniel Dunbar [Sat, 17 Oct 2009 18:12:45 +0000 (18:12 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84341 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse raw_ostream instead of C stdio.
Daniel Dunbar [Sat, 17 Oct 2009 18:12:37 +0000 (18:12 +0000)]
Use raw_ostream instead of C stdio.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84340 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRewrite AttributeList::getKind to use StringRef API.
Daniel Dunbar [Sat, 17 Oct 2009 18:12:29 +0000 (18:12 +0000)]
Rewrite AttributeList::getKind to use StringRef API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84339 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify.
Daniel Dunbar [Sat, 17 Oct 2009 18:12:21 +0000 (18:12 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84338 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse raw_ostream for formatting integers, and use IdentifierInfo::getNameStr
Daniel Dunbar [Sat, 17 Oct 2009 18:12:14 +0000 (18:12 +0000)]
Use raw_ostream for formatting integers, and use IdentifierInfo::getNameStr
instead of getName.
 - -2 FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84337 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor cleanup: move typedef out of anonymous namespace (which now contains nothing...
Ted Kremenek [Sat, 17 Oct 2009 17:45:11 +0000 (17:45 +0000)]
Minor cleanup: move typedef out of anonymous namespace (which now contains nothing) and into RemoveDeadBindings.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84335 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWrite the preprocessor block after we write out types + declarations,
Douglas Gregor [Sat, 17 Oct 2009 17:25:45 +0000 (17:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84334 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSuppress -Asserts warning.
Daniel Dunbar [Sat, 17 Oct 2009 09:39:30 +0000 (09:39 +0000)]
Suppress -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84329 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a FIXME that doesn't belong, there are numerous other places that use
Daniel Dunbar [Sat, 17 Oct 2009 09:38:57 +0000 (09:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify (move guard to caller instead of callee).
Daniel Dunbar [Sat, 17 Oct 2009 09:04:56 +0000 (09:04 +0000)]
Simplify (move guard to caller instead of callee).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPer discussion with Ted, the 'FromSuper'/'FromSub' logic is invalid. Simplify
Zhongxing Xu [Sat, 17 Oct 2009 08:39:24 +0000 (08:39 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84323 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix another static analyzer crash due to a corner case in "folding" symbolic values...
Ted Kremenek [Sat, 17 Oct 2009 07:39:35 +0000 (07:39 +0000)]
Fix another static analyzer crash due to a corner case in "folding" symbolic values that are constrained to be a constant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84320 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoActually all regions whose super region is not MemSpaceRegion are of these 3
Zhongxing Xu [Sat, 17 Oct 2009 07:32:08 +0000 (07:32 +0000)]
Actually all regions whose super region is not MemSpaceRegion are of these 3
kinds. This means we are visiting all regions 'from super region'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84319 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix compiler warning: "ISO C90 forbids mixed declarations and code"
Ted Kremenek [Sat, 17 Oct 2009 06:42:15 +0000 (06:42 +0000)]
Fix compiler warning: "ISO C90 forbids mixed declarations and code"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84318 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix warning: 'warning: C++ style comments are not allowed in ISO C90'
Ted Kremenek [Sat, 17 Oct 2009 06:37:16 +0000 (06:37 +0000)]
Fix warning: 'warning: C++ style comments are not allowed in ISO C90'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84317 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoResolve FIXME: delete the 'Program' object in the destructor of CIndexer.
Ted Kremenek [Sat, 17 Oct 2009 06:21:47 +0000 (06:21 +0000)]
Resolve FIXME: delete the 'Program' object in the destructor of CIndexer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84313 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't crash when dumping pretty stack traces, if the current tok is an
Daniel Dunbar [Sat, 17 Oct 2009 06:13:04 +0000 (06:13 +0000)]
Don't crash when dumping pretty stack traces, if the current tok is an
annotation token.
 - I'm not sure what the best thing to print is, for now we just print the token
   location and 'at annotation token'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84312 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5211: codegen shouldn't assume that the result of ||/&& is int
Chris Lattner [Sat, 17 Oct 2009 04:24:20 +0000 (04:24 +0000)]
Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore.  In C++ it is bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify.
Daniel Dunbar [Sat, 17 Oct 2009 03:28:56 +0000 (03:28 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84307 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd IdentiferInfo::getNameStr() -> StringRef.
Daniel Dunbar [Sat, 17 Oct 2009 03:28:48 +0000 (03:28 +0000)]
Add IdentiferInfo::getNameStr() -> StringRef.

Also, add getNameStart as a synonym for getName(). getName() is now deprecated,
when all clients are updated then getNameStr() should be renamed to
getName(). PR5218.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84306 91177308-0d34-0410-b5e6-96231b3b80d8