]> granicus.if.org Git - clang/log
clang
14 years agolibclang: Execute clang_codeCompleteAt() inside a crash recovery context.
Daniel Dunbar [Thu, 19 Aug 2010 23:44:10 +0000 (23:44 +0000)]
libclang: Execute clang_codeCompleteAt() inside a crash recovery context.
 - Test case is disabled for now, because something isn't write with file
   remapping.

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

14 years agoc-index-test: Diagnose parse / completion failures in -code-completion-at=.
Daniel Dunbar [Thu, 19 Aug 2010 23:44:06 +0000 (23:44 +0000)]
c-index-test: Diagnose parse / completion failures in -code-completion-at=.

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

14 years agoc-index-test: As with reparse, only honor remapped false during the code
Daniel Dunbar [Thu, 19 Aug 2010 23:44:04 +0000 (23:44 +0000)]
c-index-test: As with reparse, only honor remapped false during the code
completion step with -code-completion-at=, to allow testing simulated source
changes.

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

14 years agolibclang/Darwin: Always set the compatibility version in the dylib.
Daniel Dunbar [Thu, 19 Aug 2010 23:44:02 +0000 (23:44 +0000)]
libclang/Darwin: Always set the compatibility version in the dylib.

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

14 years agoFix some typos in the documentation of -fdiagnostics-parseable-fixits. Typos by me...
Douglas Gregor [Thu, 19 Aug 2010 23:31:13 +0000 (23:31 +0000)]
Fix some typos in the documentation of -fdiagnostics-parseable-fixits. Typos by me, patch by Eelis van der Weegen

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

14 years agoCorrectly instantiate templates with non-type template arguments that
John McCall [Thu, 19 Aug 2010 23:06:02 +0000 (23:06 +0000)]
Correctly instantiate templates with non-type template arguments that
are local externs.  Fixes <rdar://problem/8302138>.

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

14 years agoFix the source range of an anonymous namespace, from Jan Bierbaum
Douglas Gregor [Thu, 19 Aug 2010 20:55:47 +0000 (20:55 +0000)]
Fix the source range of an anonymous namespace, from Jan Bierbaum

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

14 years agoIntialize all of the code-generation options
Douglas Gregor [Thu, 19 Aug 2010 20:50:45 +0000 (20:50 +0000)]
Intialize all of the code-generation options

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

14 years agoFix a c-index-test leak with file remapping
Douglas Gregor [Thu, 19 Aug 2010 20:50:29 +0000 (20:50 +0000)]
Fix a c-index-test leak with file remapping

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

14 years agoAdd machine-parseable Fix-It output as part of diagnostics, under the
Douglas Gregor [Thu, 19 Aug 2010 20:24:43 +0000 (20:24 +0000)]
Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!

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

14 years agoFix a loop overrun in ComputePreamble when the last remapped file was erased,
Daniel Dunbar [Thu, 19 Aug 2010 19:40:40 +0000 (19:40 +0000)]
Fix a loop overrun in ComputePreamble when the last remapped file was erased,
and reenable crash recovery test.
 - Reparsing is still very crashy / weird, so I had to sprinkle random code into
   the remapped input to get it to do what I want (i.e., crash!).

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

14 years agoTest for PR7888.
Eli Friedman [Thu, 19 Aug 2010 19:13:24 +0000 (19:13 +0000)]
Test for PR7888.

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

14 years agoRemove dead code. Patch by Jon Mulder!
Jordy Rose [Thu, 19 Aug 2010 18:59:37 +0000 (18:59 +0000)]
Remove dead code. Patch by Jon Mulder!

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

14 years agoWe don't actually need to check the implicit object argument's
Douglas Gregor [Thu, 19 Aug 2010 17:02:01 +0000 (17:02 +0000)]
We don't actually need to check the implicit object argument's
conversion a second time for a conversion candidate (with the real
acting context), because the only problems we would find are access or
ambiguity issues that won't be diagnosed until we pick this
candidate. Add a test case to prove it to myself.

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

14 years agoCrashRecovery: Disable the reparse test for now while I investigate, it goes
Daniel Dunbar [Thu, 19 Aug 2010 16:40:14 +0000 (16:40 +0000)]
CrashRecovery: Disable the reparse test for now while I investigate, it goes
bonkers sometimes.

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

14 years agoProperly implement the part of C++ [over.match.funcs]p4 that treats
Douglas Gregor [Thu, 19 Aug 2010 15:57:50 +0000 (15:57 +0000)]
Properly implement the part of C++ [over.match.funcs]p4 that treats
conversion functions as if their acting context were the class that
we're converting from (the implicit object argument's
type). Retroactively tweaking the implicit conversion sequence, as we
were trying to do before, breaks the invariants of that implicit
conversion sequence (e.g., the types and conversions don't match
up). Fixes <rdar://problem/8018274>.

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

14 years agoInclude a proper citation for the wacky hijinks involving conversion functions and...
Douglas Gregor [Thu, 19 Aug 2010 15:37:02 +0000 (15:37 +0000)]
Include a proper citation for the wacky hijinks involving conversion functions and the implicit object parameter type. No functionality change.

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

14 years agosupport for predicates with bool/pixel arguments
Anton Yartsev [Thu, 19 Aug 2010 11:57:49 +0000 (11:57 +0000)]
support for predicates with bool/pixel arguments

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

14 years agoRemove default argument from operator delete; per report on cfe-dev, fixes
Eli Friedman [Thu, 19 Aug 2010 06:13:01 +0000 (06:13 +0000)]
Remove default argument from operator delete; per report on cfe-dev, fixes
compilation with MSVC.  Note that on other platforms, the operator delete in
question is never used because we compile with -fno-exceptions.

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

14 years agoFix for PR7911 and PR7921: make isIntegralOrEnumerationType return false
Eli Friedman [Thu, 19 Aug 2010 04:39:37 +0000 (04:39 +0000)]
Fix for PR7911 and PR7921: make isIntegralOrEnumerationType return false
for incomplete enum types.  An incomplete enum can't really be treated as
an "integral or enumeration" type, and the incorrect treatment leads to
bad behavior for many callers.

This makes isIntegralOrEnumerationType equivalent to isIntegerType; I think
we should globally replace the latter with the former; thoughts?

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

14 years agosupport for the rest of AltiVec functions with bool/pixel arguments and return values...
Anton Yartsev [Thu, 19 Aug 2010 03:21:36 +0000 (03:21 +0000)]
support for the rest of AltiVec functions with bool/pixel arguments and return values (except predicates)

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

14 years agoAdd a missing initializer.
Sean Hunt [Thu, 19 Aug 2010 03:06:50 +0000 (03:06 +0000)]
Add a missing initializer.

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

14 years agosupport for vec_perm and all dependent functions (vec_mergeh, vec_mergel, vec_pack...
Anton Yartsev [Thu, 19 Aug 2010 03:00:09 +0000 (03:00 +0000)]
support for vec_perm and all dependent functions (vec_mergeh, vec_mergel, vec_pack, vec_sld, vec_splat) with bool/pixel arguments and return values

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

14 years agoAdd some enum goodness as requested by Chris. Now instead of storing the
Charles Davis [Thu, 19 Aug 2010 02:18:14 +0000 (02:18 +0000)]
Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)

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

14 years agoPlug a leak when precompiling the preamble in ASTUnit.
Douglas Gregor [Thu, 19 Aug 2010 01:33:06 +0000 (01:33 +0000)]
Plug a leak when precompiling the preamble in ASTUnit.

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

14 years agoRestore the build
John McCall [Thu, 19 Aug 2010 01:21:57 +0000 (01:21 +0000)]
Restore the build

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

14 years agoOn second thought, don't warn about reinterpret_casts under -Wcast-align.
John McCall [Thu, 19 Aug 2010 01:19:08 +0000 (01:19 +0000)]
On second thought, don't warn about reinterpret_casts under -Wcast-align.

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

14 years agoAdd a special RecordLayoutBuilder for the Microsoft C++ ABI.
Charles Davis [Thu, 19 Aug 2010 00:55:19 +0000 (00:55 +0000)]
Add a special RecordLayoutBuilder for the Microsoft C++ ABI.

All it does right now is add space for two vtable pointers instead of one
when a class has both virtual methods and virtual bases. This is a requirement
of the Microsoft ABI, since it has separate vtables for methods and bases. Other
stuff will come up over time, but we'll cross those bridges when we get to
them.

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

14 years agoAdd warning for functions/blocks that have attribute 'noreturn' but return a non...
Ted Kremenek [Thu, 19 Aug 2010 00:52:13 +0000 (00:52 +0000)]
Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)

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

14 years agoHandleCommonNoReturnAttr() now only has a single caller. Move that logic to HandleAn...
Ted Kremenek [Thu, 19 Aug 2010 00:51:58 +0000 (00:51 +0000)]
HandleCommonNoReturnAttr() now only has a single caller.  Move that logic to HandleAnalyzerNoReturnAttr.

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

14 years agoMake sure to initialize ASTUnit::UnsafeToFree
Douglas Gregor [Thu, 19 Aug 2010 00:45:44 +0000 (00:45 +0000)]
Make sure to initialize ASTUnit::UnsafeToFree

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

14 years agoMake sure to deallocate the identifier lookup tables and selector tables
Douglas Gregor [Thu, 19 Aug 2010 00:28:17 +0000 (00:28 +0000)]
Make sure to deallocate the identifier lookup tables and selector tables
when destroying an ASTReader. Plugs a leak that shows up in libclang.

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

14 years agoWhen deducing the element type of an array, ignore qualifiers if
John McCall [Thu, 19 Aug 2010 00:20:19 +0000 (00:20 +0000)]
When deducing the element type of an array, ignore qualifiers if
the context allows us to ignore qualifiers on the array type itself.

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

14 years agoRename pch namespace to serialization.
Sebastian Redl [Wed, 18 Aug 2010 23:57:32 +0000 (23:57 +0000)]
Rename pch namespace to serialization.

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

14 years agoRename PCHBitCodes.h -> ASTBitCodes.h
Sebastian Redl [Wed, 18 Aug 2010 23:57:26 +0000 (23:57 +0000)]
Rename PCHBitCodes.h -> ASTBitCodes.h

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

14 years agoRename stuff in PCHBitCodes.h
Sebastian Redl [Wed, 18 Aug 2010 23:57:22 +0000 (23:57 +0000)]
Rename stuff in PCHBitCodes.h

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

14 years agoRename the ASTReader header files.
Sebastian Redl [Wed, 18 Aug 2010 23:57:17 +0000 (23:57 +0000)]
Rename the ASTReader header files.

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

14 years agoRename the ASTReader implementation files.
Sebastian Redl [Wed, 18 Aug 2010 23:57:11 +0000 (23:57 +0000)]
Rename the ASTReader implementation files.

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

14 years agoMore PCH -> AST renaming.
Sebastian Redl [Wed, 18 Aug 2010 23:57:06 +0000 (23:57 +0000)]
More PCH -> AST renaming.

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

14 years agoRename various classes from PCH to AST.
Sebastian Redl [Wed, 18 Aug 2010 23:56:56 +0000 (23:56 +0000)]
Rename various classes from PCH to AST.

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

14 years agoRename PCHStmtReader -> ASTStmtReader.
Sebastian Redl [Wed, 18 Aug 2010 23:56:52 +0000 (23:56 +0000)]
Rename PCHStmtReader -> ASTStmtReader.

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

14 years agoRename PCHDeclReader -> ASTDeclReader.
Sebastian Redl [Wed, 18 Aug 2010 23:56:48 +0000 (23:56 +0000)]
Rename PCHDeclReader -> ASTDeclReader.

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

14 years agoRename PCHReader to ASTReader.
Sebastian Redl [Wed, 18 Aug 2010 23:56:43 +0000 (23:56 +0000)]
Rename PCHReader to ASTReader.

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

14 years agoRename PCHWriter.h to ASTWriter.h
Sebastian Redl [Wed, 18 Aug 2010 23:56:37 +0000 (23:56 +0000)]
Rename PCHWriter.h to ASTWriter.h

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

14 years agoRename the ASTWriter implementation files
Sebastian Redl [Wed, 18 Aug 2010 23:56:31 +0000 (23:56 +0000)]
Rename the ASTWriter implementation files

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

14 years agoDo the PCH->AST rename for ASTWriter's implementation parts.
Sebastian Redl [Wed, 18 Aug 2010 23:56:27 +0000 (23:56 +0000)]
Do the PCH->AST rename for ASTWriter's implementation parts.

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

14 years agoRename PCHWriter to ASTWriter
Sebastian Redl [Wed, 18 Aug 2010 23:56:21 +0000 (23:56 +0000)]
Rename PCHWriter to ASTWriter

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

14 years agoWhen creating an ASTUnit by parsing source code, set DisableFree to
Douglas Gregor [Wed, 18 Aug 2010 23:38:21 +0000 (23:38 +0000)]
When creating an ASTUnit by parsing source code, set DisableFree to
false (not true), so that the CompilerInstance will actually free data
structures when it's done. This fixes a major leak with libclang's
in-process code completion.

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

14 years agoGenerate Attr subclasses with TableGen.
Sean Hunt [Wed, 18 Aug 2010 23:23:40 +0000 (23:23 +0000)]
Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

 - The constructor arguments are a SourceLocation and a Context&,
   followed by the attributes arguments in the order that they were
   defined in Attr.td

 - Every argument in Attr.td has an appropriate accessor named getFoo,
   and there are sometimes a few extra ones (such as to get the length
   of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

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

14 years agolibclang: Put clang_reparseTranslationUnit inside a crash recovery context.
Daniel Dunbar [Wed, 18 Aug 2010 23:09:31 +0000 (23:09 +0000)]
libclang: Put clang_reparseTranslationUnit inside a crash recovery context.

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

14 years agoCrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging
Daniel Dunbar [Wed, 18 Aug 2010 23:09:23 +0000 (23:09 +0000)]
CrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging
CrashRecovery since it avoids sending a signal which may be intercepted by the
debugger.

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

14 years agoc-index-test: Change -test-load-source-repase to only use remapped files for the
Daniel Dunbar [Wed, 18 Aug 2010 23:09:16 +0000 (23:09 +0000)]
c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs.

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

14 years agoFix crasher with IgnoringDiagClient
Douglas Gregor [Wed, 18 Aug 2010 23:03:13 +0000 (23:03 +0000)]
Fix crasher with IgnoringDiagClient

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

14 years agoSimplify the ownership model for DiagnosticClients, which was really
Douglas Gregor [Wed, 18 Aug 2010 22:29:43 +0000 (22:29 +0000)]
Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.

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

14 years agoAdd/update a bunch of svn:ignore properties; get rid of empty folder
Eli Friedman [Wed, 18 Aug 2010 22:15:06 +0000 (22:15 +0000)]
Add/update a bunch of svn:ignore properties; get rid of empty folder
lib/Runtime.

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

14 years agoThere is no pointer conversion between to similar types (i.e., same
Douglas Gregor [Wed, 18 Aug 2010 21:25:30 +0000 (21:25 +0000)]
There is no pointer conversion between to similar types (i.e., same
type ignoring cv-qualifiers). These are qualification
conversions. Fixes PR7934.

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

14 years agoCall llvm::remove_fatal_error_handler before deallocating objects
Dan Gohman [Wed, 18 Aug 2010 21:23:17 +0000 (21:23 +0000)]
Call llvm::remove_fatal_error_handler before deallocating objects
which are used by the error handling functions.

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

14 years agoAdded psuedo-constant analysis and integrated it into the false positive reduction...
Tom Care [Wed, 18 Aug 2010 21:17:24 +0000 (21:17 +0000)]
Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified

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

14 years agoContextual arity is a feature of mangling expressions; kill off
John McCall [Wed, 18 Aug 2010 19:18:59 +0000 (19:18 +0000)]
Contextual arity is a feature of mangling expressions;  kill off
mangleCallExpression.  Also, operator names with unknown arity should
be mangled as binary operators;  this is actually covered by an oddly-
positioned sentence in the ABI document.  Fixes PR7891.

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

14 years agolibclang: Put clang_parseTranslationUnit inside a crash recovery context.
Daniel Dunbar [Wed, 18 Aug 2010 18:43:17 +0000 (18:43 +0000)]
libclang: Put clang_parseTranslationUnit inside a crash recovery context.

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

14 years agolibclang: Implicitly enable crash recovery when using the libclang APIs. We may need...
Daniel Dunbar [Wed, 18 Aug 2010 18:43:14 +0000 (18:43 +0000)]
libclang: Implicitly enable crash recovery when using the libclang APIs. We may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off.

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

14 years agozap dead code.
Chris Lattner [Wed, 18 Aug 2010 16:09:06 +0000 (16:09 +0000)]
zap dead code.

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

14 years agono need to pass bumppointer allocator into macroinfo::destroy
Chris Lattner [Wed, 18 Aug 2010 16:08:51 +0000 (16:08 +0000)]
no need to pass bumppointer allocator into macroinfo::destroy

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

14 years agoMake sure to add MallocAttr to explicitly-declared operator new/new[]
Douglas Gregor [Wed, 18 Aug 2010 15:06:25 +0000 (15:06 +0000)]
Make sure to add MallocAttr to explicitly-declared operator new/new[]
when -fassume-sane-operator-new. Patch by Tom Jablin!

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

14 years agoSimplify FixItHint by eliminated the unnecessary InsertionLoc
Douglas Gregor [Wed, 18 Aug 2010 14:24:02 +0000 (14:24 +0000)]
Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!

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

14 years agoFlesh out the test cases a little.
John McCall [Wed, 18 Aug 2010 09:58:15 +0000 (09:58 +0000)]
Flesh out the test cases a little.

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

14 years agoRip out the existing retroactive abstract-class usage checker,
John McCall [Wed, 18 Aug 2010 09:41:07 +0000 (09:41 +0000)]
Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class.  Also, look into templates when doing this.

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

14 years agoRemove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.
Argyrios Kyrtzidis [Wed, 18 Aug 2010 08:32:33 +0000 (08:32 +0000)]
Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.

This effectively disables -Wunused-member-function for building llvm/clang.

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

14 years agoCheck whether errors should be included in the diagnostic counts. Previously,
Chandler Carruth [Wed, 18 Aug 2010 06:46:41 +0000 (06:46 +0000)]
Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.

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

14 years agoRemove dead malloc symbols from the symbol-state map.
Jordy Rose [Wed, 18 Aug 2010 04:33:47 +0000 (04:33 +0000)]
Remove dead malloc symbols from the symbol-state map.

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

14 years agoUse RegionStateTy everywhere we mean ImmutableMap<SymbolRef, RefState>
Jordy Rose [Wed, 18 Aug 2010 04:26:59 +0000 (04:26 +0000)]
Use RegionStateTy everywhere we mean ImmutableMap<SymbolRef, RefState>

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

14 years agozap dead code.
Chris Lattner [Wed, 18 Aug 2010 02:45:56 +0000 (02:45 +0000)]
zap dead code.

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

14 years agozap a big dead method.
Chris Lattner [Wed, 18 Aug 2010 02:44:19 +0000 (02:44 +0000)]
zap a big dead method.

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

14 years agoEmit an error if an array is too large. We're slightly more strict
Douglas Gregor [Wed, 18 Aug 2010 00:39:00 +0000 (00:39 +0000)]
Emit an error if an array is too large. We're slightly more strict
than GCC 4.2 here when building 32-bit (where GCC will allow
allocation of an array for which we can't get a valid past-the-end
pointer), and emulate its odd behavior in 64-bit where it only allows
63 bits worth of storage in the array. The former is a correctness
issue; the latter is harmless in practice (you wouldn't be able to use
such an array anyway) and helps us pass a GCC DejaGNU test.

Fixes <rdar://problem/8212293>.

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

14 years agofix typo
Chris Lattner [Wed, 18 Aug 2010 00:13:52 +0000 (00:13 +0000)]
fix typo

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

14 years agoFix PR7889 by generalizing some over specialized code. There is no
Chris Lattner [Wed, 18 Aug 2010 00:08:27 +0000 (00:08 +0000)]
Fix PR7889 by generalizing some over specialized code.  There is no
reason that this should be limited to simple lvalues.

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

14 years agofix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__
Chris Lattner [Tue, 17 Aug 2010 23:58:10 +0000 (23:58 +0000)]
fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__

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

14 years agoTypedRegion::isBoundable() should return true by default. Since there is no TypedVie...
Ted Kremenek [Tue, 17 Aug 2010 23:51:30 +0000 (23:51 +0000)]
TypedRegion::isBoundable() should return true by default.  Since there is no TypedViewRegion anyore, it is not possible that the subclass (which doesn't override isBoundable) could return a null value type.

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

14 years agoGet rid of extra nesting when checking for invalid type,
Fariborz Jahanian [Tue, 17 Aug 2010 23:50:37 +0000 (23:50 +0000)]
Get rid of extra nesting when checking for invalid type,
per Doug's comment.

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

14 years agoRewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric!
Ted Kremenek [Tue, 17 Aug 2010 23:29:06 +0000 (23:29 +0000)]
Rewrite code fragment to avoide ICE in MSVC.  Fixes PR 7875.  Patch by Dimitry Andric!

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

14 years agoDiagnose if type of iboutletcollection attribute is a builtin type.
Fariborz Jahanian [Tue, 17 Aug 2010 23:19:16 +0000 (23:19 +0000)]
Diagnose if type of iboutletcollection attribute is a builtin type.

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

14 years agoGet rid of pretty non-ASCII quotes.
Sebastian Redl [Tue, 17 Aug 2010 22:42:34 +0000 (22:42 +0000)]
Get rid of pretty non-ASCII quotes.

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

14 years agoStringRef'ication of lots stuff, patch by Peter Davies!
Daniel Dunbar [Tue, 17 Aug 2010 22:39:59 +0000 (22:39 +0000)]
StringRef'ication of lots stuff, patch by Peter Davies!

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

14 years agoLex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
Daniel Dunbar [Tue, 17 Aug 2010 22:32:48 +0000 (22:32 +0000)]
Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.

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

14 years agoDriver: Claim the -mlinker-version synthesized argument, it shouldn't be
Daniel Dunbar [Tue, 17 Aug 2010 22:32:45 +0000 (22:32 +0000)]
Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
reported as unused.

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

14 years agoRename -Wunused-method -> -Wunused-member-function.
Argyrios Kyrtzidis [Tue, 17 Aug 2010 22:06:44 +0000 (22:06 +0000)]
Rename -Wunused-method -> -Wunused-member-function.

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

14 years agoRemove dead code.
Ted Kremenek [Tue, 17 Aug 2010 22:05:33 +0000 (22:05 +0000)]
Remove dead code.

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

14 years agoWhoops. Don't fall through into the overload case when mangling a
John McCall [Tue, 17 Aug 2010 21:51:21 +0000 (21:51 +0000)]
Whoops.  Don't fall through into the overload case when mangling a
dependent call expression.

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

14 years agoIntroduce -Wunused-method option for warning on unused class methods in anonymous...
Argyrios Kyrtzidis [Tue, 17 Aug 2010 21:43:11 +0000 (21:43 +0000)]
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace.

This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed
and we are ready to turn it on. Suggestion by Daniel.

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

14 years agoDiagnose use of iboutletcollection on ivar/property
Fariborz Jahanian [Tue, 17 Aug 2010 21:39:27 +0000 (21:39 +0000)]
Diagnose use of iboutletcollection on ivar/property
of non-object types. Radar 8308053.

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

14 years agoImplicit decl ref expressions might not have name locations; don't silently
John McCall [Tue, 17 Aug 2010 21:27:17 +0000 (21:27 +0000)]
Implicit decl ref expressions might not have name locations;  don't silently
fail to instantiate them.

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

14 years agoFix CMake build
Sebastian Redl [Tue, 17 Aug 2010 21:00:23 +0000 (21:00 +0000)]
Fix CMake build

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

14 years agoFix horrible CFG bug caused by a series of NullStmts appearing at the beginning of...
Ted Kremenek [Tue, 17 Aug 2010 21:00:06 +0000 (21:00 +0000)]
Fix horrible CFG bug caused by a series of NullStmts appearing at the beginning of a do...while loop.  This would cause
the body of the DoStmt to be disconnected from the preceding code.

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

14 years agoCFGBuilder: don't create the empty "loop back" block for DoStmts if the loop edge...
Ted Kremenek [Tue, 17 Aug 2010 20:59:56 +0000 (20:59 +0000)]
CFGBuilder: don't create the empty "loop back" block for DoStmts if the loop edge can never be taken.

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

14 years agoReintroduce the serialization library, with fixed dependencies.
Sebastian Redl [Tue, 17 Aug 2010 20:43:28 +0000 (20:43 +0000)]
Reintroduce the serialization library, with fixed dependencies.

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

14 years agoPatch to add type parameter support for attribute iboutletcollection.
Fariborz Jahanian [Tue, 17 Aug 2010 20:23:12 +0000 (20:23 +0000)]
Patch to add type parameter support for attribute iboutletcollection.
Radar 8308053.

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

14 years agoRemove the last bit of the Clang Serialization library, for now
Douglas Gregor [Tue, 17 Aug 2010 19:00:27 +0000 (19:00 +0000)]
Remove the last bit of the Clang Serialization library, for now

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

14 years agoRevert Sebastian's build-breaking patch.
Douglas Gregor [Tue, 17 Aug 2010 18:31:01 +0000 (18:31 +0000)]
Revert Sebastian's build-breaking patch.

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

14 years agoAdd the clangSerialization library to libclang.
Dan Gohman [Tue, 17 Aug 2010 18:07:30 +0000 (18:07 +0000)]
Add the clangSerialization library to libclang.

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

14 years agoCreate a new Serialization module that contains all the PCH code, and will contain...
Sebastian Redl [Tue, 17 Aug 2010 17:55:49 +0000 (17:55 +0000)]
Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.

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