]> granicus.if.org Git - clang/log
clang
15 years agolit: Fix a name lookup problem, which only occurred on a race condition. This is
Daniel Dunbar [Sat, 1 Aug 2009 04:11:36 +0000 (04:11 +0000)]
lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.

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

15 years agolit: Pull a few more variables into the TestingConfig object.
Daniel Dunbar [Sat, 1 Aug 2009 04:06:02 +0000 (04:06 +0000)]
lit: Pull a few more variables into the TestingConfig object.

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

15 years agolit: Don't use threads when only running one test, or with -j 1.
Daniel Dunbar [Sat, 1 Aug 2009 03:35:40 +0000 (03:35 +0000)]
lit: Don't use threads when only running one test, or with -j 1.

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

15 years agoMultiTestRunner: Add 'sh' parsing to ShUtil.
Daniel Dunbar [Sat, 1 Aug 2009 03:22:27 +0000 (03:22 +0000)]
MultiTestRunner: Add 'sh' parsing to ShUtil.

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

15 years agoMore warnings for unused expressions.
Anders Carlsson [Sat, 1 Aug 2009 01:39:59 +0000 (01:39 +0000)]
More warnings for unused expressions.

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

15 years agoAdd beginnigs of rtti generation, wire up more of -fno-exceptions.
Mike Stump [Fri, 31 Jul 2009 23:15:31 +0000 (23:15 +0000)]
Add beginnigs of rtti generation, wire up more of -fno-exceptions.

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

15 years agoRemove the old struct builder code.
Anders Carlsson [Fri, 31 Jul 2009 21:48:56 +0000 (21:48 +0000)]
Remove the old struct builder code.

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

15 years agoAnd now we can generate a simple vtable. Still a work in progress...
Mike Stump [Fri, 31 Jul 2009 21:43:43 +0000 (21:43 +0000)]
And now we can generate a simple vtable.  Still a work in progress...

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

15 years agoMove code from EmitUnion directly into the function that handles cast-to-union.
Anders Carlsson [Fri, 31 Jul 2009 21:38:39 +0000 (21:38 +0000)]
Move code from EmitUnion directly into the function that handles cast-to-union.

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

15 years agoUse the struct builder for unions.
Anders Carlsson [Fri, 31 Jul 2009 21:34:04 +0000 (21:34 +0000)]
Use the struct builder for unions.

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

15 years agoFixup spacing and 80-col violations.
Mike Stump [Fri, 31 Jul 2009 21:31:32 +0000 (21:31 +0000)]
Fixup spacing and 80-col violations.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Fri, 31 Jul 2009 20:28:54 +0000 (20:28 +0000)]
Update for LLVM API change.

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

15 years agoFor a CXXOperatorCallExpr, fix the order that StmtLocResolver uses to check subexpres...
Argyrios Kyrtzidis [Fri, 31 Jul 2009 19:02:11 +0000 (19:02 +0000)]
For a CXXOperatorCallExpr, fix the order that StmtLocResolver uses to check subexpressions.

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

15 years agoMake the recanonicalization-for-an-out-of-line-definition test case a bit trickier
Douglas Gregor [Fri, 31 Jul 2009 18:36:42 +0000 (18:36 +0000)]
Make the recanonicalization-for-an-out-of-line-definition test case a bit trickier

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

15 years agoAllow one to update the type representation of the declaration specifiers. Will be...
Douglas Gregor [Fri, 31 Jul 2009 18:34:30 +0000 (18:34 +0000)]
Allow one to update the type representation of the declaration specifiers. Will be used by an upcoming commit.

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

15 years agoRemove a redundant getCanonicalType call
Douglas Gregor [Fri, 31 Jul 2009 18:32:42 +0000 (18:32 +0000)]
Remove a redundant getCanonicalType call

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

15 years agoAdd code to setup the vtable pointer in the constructor. Work in progress.
Mike Stump [Fri, 31 Jul 2009 18:25:34 +0000 (18:25 +0000)]
Add code to setup the vtable pointer in the constructor.  Work in progress.

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

15 years agoNew test case for rev. 77694.
Devang Patel [Fri, 31 Jul 2009 18:24:12 +0000 (18:24 +0000)]
New test case for rev. 77694.

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

15 years agoMultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.
Daniel Dunbar [Fri, 31 Jul 2009 18:12:18 +0000 (18:12 +0000)]
MultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.

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

15 years agoFix spacing.
Mike Stump [Fri, 31 Jul 2009 17:46:44 +0000 (17:46 +0000)]
Fix spacing.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Fri, 31 Jul 2009 17:39:36 +0000 (17:39 +0000)]
Update for LLVM API change.

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

15 years agoFix 80-col violation
Douglas Gregor [Fri, 31 Jul 2009 16:50:39 +0000 (16:50 +0000)]
Fix 80-col violation

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

15 years agoMake canonicalization of overloaded function declarations match the
Douglas Gregor [Fri, 31 Jul 2009 16:07:31 +0000 (16:07 +0000)]
Make canonicalization of overloaded function declarations match the
Itanium C++ ABI's name mangling, since both are related to the notion
of "equivalent" function templates.

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

15 years agoCanonicalize template template parameters. We can't test this yet, but
Douglas Gregor [Fri, 31 Jul 2009 15:46:56 +0000 (15:46 +0000)]
Canonicalize template template parameters. We can't test this yet, but
it's "obviously correct" :)

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

15 years agoCanonicalize function parameters
Douglas Gregor [Fri, 31 Jul 2009 15:45:02 +0000 (15:45 +0000)]
Canonicalize function parameters

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

15 years agoMultiTestRunner: Add module for lexing 'sh' commands.
Daniel Dunbar [Fri, 31 Jul 2009 07:59:05 +0000 (07:59 +0000)]
MultiTestRunner: Add module for lexing 'sh' commands.

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

15 years agoAdd missing test suffixes.
Daniel Dunbar [Fri, 31 Jul 2009 05:57:11 +0000 (05:57 +0000)]
Add missing test suffixes.

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

15 years agoMultiTestRunner: Simplify, cleanup, and rename!
Daniel Dunbar [Fri, 31 Jul 2009 05:54:17 +0000 (05:54 +0000)]
MultiTestRunner: Simplify, cleanup, and rename!
 - MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
   tester/testing. This has the pros of being pronouncable and short.

 - "Project" level configuration lives in 'lit.cfg', which is also what lit uses
   to find the root testing directory in some cases. This can be overridden for
   use in project files which want to precisely specify where things are.

 - TestRunner.py is not longer able to be invoked directly.

 - Moved some code to Util.py.

 - Introduced a configuration object.

 - Cleaned up --help, removed a few not-very-useful options.

 - Tried not to break anything that works. :)

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

15 years agoCanonicalization and profiling for overloaded function declarations,
Douglas Gregor [Fri, 31 Jul 2009 05:24:01 +0000 (05:24 +0000)]
Canonicalization and profiling for overloaded function declarations,
for those extra-esoteric cases. Not that any two given C++ compilers
agree on this test case, but this change gives us a strong definition
of equivalent types.

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

15 years agoCanonicalize dependent extended vector types.
Douglas Gregor [Fri, 31 Jul 2009 03:54:25 +0000 (03:54 +0000)]
Canonicalize dependent extended vector types.

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

15 years agoPR3679 - enable #pragma weak aliasing.
Ryan Flynn [Fri, 31 Jul 2009 02:52:19 +0000 (02:52 +0000)]
PR3679 - enable #pragma weak aliasing.

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

15 years agoRename Action::TagKind to Action::TagUseKind, which removes both a misnomer
John McCall [Fri, 31 Jul 2009 02:45:11 +0000 (02:45 +0000)]
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.

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

15 years agosp.
John McCall [Fri, 31 Jul 2009 02:20:35 +0000 (02:20 +0000)]
sp.

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

15 years agoWhitespace around else canonicalization and fix 80-col violations.
Mike Stump [Fri, 31 Jul 2009 02:02:20 +0000 (02:02 +0000)]
Whitespace around else canonicalization and fix 80-col violations.

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

15 years agoMake the check for the linkage of a template handle the case of nested
Eli Friedman [Fri, 31 Jul 2009 01:43:05 +0000 (01:43 +0000)]
Make the check for the linkage of a template handle the case of nested
linkage specifications correctly.

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

15 years agoAdd CK_DerivedToBase and use it PerformObjectMemberConversion.
Anders Carlsson [Fri, 31 Jul 2009 01:23:52 +0000 (01:23 +0000)]
Add CK_DerivedToBase and use it PerformObjectMemberConversion.

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

15 years agoFix build warnings.
Mike Stump [Fri, 31 Jul 2009 01:10:29 +0000 (01:10 +0000)]
Fix build warnings.

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

15 years agoAdd a CastKind enum to CastExpr. Right now it's not used for much but it will be :)
Anders Carlsson [Fri, 31 Jul 2009 00:48:10 +0000 (00:48 +0000)]
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)

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

15 years agoFix use-after-release bug introduced in r77585 where the PathDiagnosticClient
Ted Kremenek [Fri, 31 Jul 2009 00:34:52 +0000 (00:34 +0000)]
Fix use-after-release bug introduced in r77585 where the PathDiagnosticClient
created by AnalysisConsumer would be released by an instance of AnalysisManager
and then reused by later instances of AnalysisManager. Ownership of the
PathDiagnosticClient now belongs (for now) in AnalysisConsumer.

We also need this layering (for now) because the HTMLDiagnostiClient requires
that the entire translation unit be processed before emitting diagnostics. This
is done in its destructor (which should also be fixed, but that is another
issue).

This fixes PR 4653.

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

15 years agoBuild canonical types for dependently-sized array types.
Douglas Gregor [Fri, 31 Jul 2009 00:23:35 +0000 (00:23 +0000)]
Build canonical types for dependently-sized array types.

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

15 years agoAdd scan-build option '-no-failure-reports' to supress the creation of a 'failures...
Ted Kremenek [Thu, 30 Jul 2009 23:55:19 +0000 (23:55 +0000)]
Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.

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

15 years agoCanonicalization of dependent C++0x decltype types.
Douglas Gregor [Thu, 30 Jul 2009 23:36:40 +0000 (23:36 +0000)]
Canonicalization of dependent C++0x decltype types.

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

15 years agoSynthesize the default constructor which has not
Fariborz Jahanian [Thu, 30 Jul 2009 23:22:00 +0000 (23:22 +0000)]
Synthesize the default constructor which has not
been declared as needed.

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

15 years agoCanonicalization for dependent typeof(expr) types.
Douglas Gregor [Thu, 30 Jul 2009 23:18:24 +0000 (23:18 +0000)]
Canonicalization for dependent typeof(expr) types.

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

15 years agoUpdate for LLVM API changes.
Owen Anderson [Thu, 30 Jul 2009 23:11:26 +0000 (23:11 +0000)]
Update for LLVM API changes.

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

15 years agoDiagnose unused expression results for all statements, just not compound statements.
Anders Carlsson [Thu, 30 Jul 2009 22:39:03 +0000 (22:39 +0000)]
Diagnose unused expression results for all statements, just not compound statements.

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

15 years agoAdd casts to avoid a bunch of unused expr warnings. (They aren't reported right now...
Anders Carlsson [Thu, 30 Jul 2009 22:37:41 +0000 (22:37 +0000)]
Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.

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

15 years agoCanonicalize else spacing.
Mike Stump [Thu, 30 Jul 2009 22:28:39 +0000 (22:28 +0000)]
Canonicalize else spacing.

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

15 years agoFactor code out into a DiagnoseUnusedExprResult function.
Anders Carlsson [Thu, 30 Jul 2009 22:17:18 +0000 (22:17 +0000)]
Factor code out into a DiagnoseUnusedExprResult function.

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

15 years agoNote some other limitations.
Mike Stump [Thu, 30 Jul 2009 21:47:44 +0000 (21:47 +0000)]
Note some other limitations.

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

15 years agoUpdate based upon comments. Explain why we have an assert.
Mike Stump [Thu, 30 Jul 2009 18:01:44 +0000 (18:01 +0000)]
Update based upon comments.  Explain why we have an assert.

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

15 years agoWe'll also need a vtable pointer if we have virtual bases.
Mike Stump [Thu, 30 Jul 2009 17:53:53 +0000 (17:53 +0000)]
We'll also need a vtable pointer if we have virtual bases.

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

15 years agoWhat luck! Clang obtains support for refering to members of the
Douglas Gregor [Thu, 30 Jul 2009 17:50:56 +0000 (17:50 +0000)]
What luck! Clang obtains support for refering to members of the
current instantiation when that current instantiation is a class
template partial specialization.

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

15 years agoPatch for future ir-gen for destructor calls.
Fariborz Jahanian [Thu, 30 Jul 2009 17:49:11 +0000 (17:49 +0000)]
Patch for future ir-gen for destructor calls.

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

15 years agoLexically order files.
Ted Kremenek [Thu, 30 Jul 2009 17:41:23 +0000 (17:41 +0000)]
Lexically order files.

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

15 years agoSupport out-of-line definitions of the members of class template
Douglas Gregor [Thu, 30 Jul 2009 17:40:51 +0000 (17:40 +0000)]
Support out-of-line definitions of the members of class template
partial specializations.

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

15 years agoInitialize an otherwise-wild pointer. Fixes a crashy analyzer
Douglas Gregor [Thu, 30 Jul 2009 16:10:26 +0000 (16:10 +0000)]
Initialize an otherwise-wild pointer. Fixes a crashy analyzer

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

15 years agofix cmake build
Benjamin Kramer [Thu, 30 Jul 2009 10:38:43 +0000 (10:38 +0000)]
fix cmake build

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

15 years agosimple fixes.
Zhongxing Xu [Thu, 30 Jul 2009 09:14:54 +0000 (09:14 +0000)]
simple fixes.

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

15 years agoMake AnalysisManager into its own source file and a pure data management class.
Zhongxing Xu [Thu, 30 Jul 2009 09:11:52 +0000 (09:11 +0000)]
Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().

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

15 years agoUpdate CMakeLists.txt
Daniel Dunbar [Thu, 30 Jul 2009 03:55:04 +0000 (03:55 +0000)]
Update CMakeLists.txt

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

15 years agoFix Selector <-> GlobalSelector conversion.
Argyrios Kyrtzidis [Thu, 30 Jul 2009 03:42:08 +0000 (03:42 +0000)]
Fix Selector <-> GlobalSelector conversion.

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

15 years agoPR3679 - handle #pragma weak
Ryan Flynn [Thu, 30 Jul 2009 03:15:39 +0000 (03:15 +0000)]
PR3679 - handle #pragma weak

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

15 years agoAdd -fblocks.
Daniel Dunbar [Thu, 30 Jul 2009 02:43:05 +0000 (02:43 +0000)]
Add -fblocks.

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

15 years agoMultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
Daniel Dunbar [Thu, 30 Jul 2009 01:57:45 +0000 (01:57 +0000)]
MultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
value.

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

15 years agoThis patch collects all analysis context data into a new class
Zhongxing Xu [Thu, 30 Jul 2009 01:17:21 +0000 (01:17 +0000)]
This patch collects all analysis context data into a new class
AnalysisContext.

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

15 years agoRemove bogus "unsupported" case for vectors (which shouldn't
Eli Friedman [Thu, 30 Jul 2009 01:10:26 +0000 (01:10 +0000)]
Remove bogus "unsupported" case for vectors (which shouldn't
ever trigger).  Add an "unsupported" case that triggers for C++ code.

It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.

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

15 years agoFix type to be consistent with the rest of the code.
Mike Stump [Thu, 30 Jul 2009 01:02:10 +0000 (01:02 +0000)]
Fix type to be consistent with the rest of the code.

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

15 years agoAdd ability to layout the vtable pointer in trivial cases. I noticed
Mike Stump [Thu, 30 Jul 2009 00:22:38 +0000 (00:22 +0000)]
Add ability to layout the vtable pointer in trivial cases.  I noticed
that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off.  When people do better things with
them, we can turn them back on.

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

15 years agoFix gcc warning.
Eli Friedman [Thu, 30 Jul 2009 00:11:31 +0000 (00:11 +0000)]
Fix gcc warning.

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

15 years agoir-gen for nested non-virtual base member access
Fariborz Jahanian [Thu, 30 Jul 2009 00:10:25 +0000 (00:10 +0000)]
ir-gen for nested non-virtual base member access
in current class.

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

15 years agoAdd support for -Wno-long-long.
Eli Friedman [Thu, 30 Jul 2009 00:04:39 +0000 (00:04 +0000)]
Add support for -Wno-long-long.

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

15 years agoAdd support for ObjC message expressions, in the Analyzer:
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:03:55 +0000 (00:03 +0000)]
Add support for ObjC message expressions, in the Analyzer:

-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.

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

15 years agoUpdate CMake.
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:02:19 +0000 (00:02 +0000)]
Update CMake.

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

15 years agoSupport ObjC methods as Entities.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:46 +0000 (23:41 +0000)]
Support ObjC methods as Entities.

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

15 years agoThere's no point in going through the getAs<TagType> stuff to find the definition...
Douglas Gregor [Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)]
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations

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

15 years agoUse a STL helper template 'pair_value_iterator', by both DeclReferenceMap and Selecto...
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:33 +0000 (23:41 +0000)]
Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.

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

15 years agoAdd ObjCMethodDecl::isThisDeclarationADefinition().
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:26 +0000 (23:41 +0000)]
Add ObjCMethodDecl::isThisDeclarationADefinition().

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

15 years agoIndex the selectors and provide the translation units that contain them
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:18 +0000 (23:41 +0000)]
Index the selectors and provide the translation units that contain them
through the IndexProvider.

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

15 years agoAdd TranslationUnit::getSelectorMap().
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:08 +0000 (23:41 +0000)]
Add TranslationUnit::getSelectorMap().

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

15 years agoIntroduce SelectorMap whose purpose is to map selectors to objc methods and message...
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:58 +0000 (23:40 +0000)]
Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
inside a particular ASTContext.

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

15 years agoFind references inside blocks.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:48 +0000 (23:40 +0000)]
Find references inside blocks.

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

15 years agoUse helper class ASTVisitor to fully traverse an AST.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:39 +0000 (23:40 +0000)]
Use helper class ASTVisitor to fully traverse an AST.

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

15 years agoIntroduce the GlobalSelector class in the Indexing library.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:32 +0000 (23:40 +0000)]
Introduce the GlobalSelector class in the Indexing library.

GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.

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

15 years agoUse an IdentifierTable for names used for Entities.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:21 +0000 (23:40 +0000)]
Use an IdentifierTable for names used for Entities.

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

15 years ago-Introduce the idx::Analyzer class used for getting indexing information, like finding
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:14 +0000 (23:40 +0000)]
-Introduce the idx::Analyzer class used for getting indexing information, like finding
references of a declaration across translation units.

-Modify the index-test tool to use it.

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

15 years agoIntroduce TULocation and TULocationHandler classes.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:02 +0000 (23:40 +0000)]
Introduce TULocation and TULocationHandler classes.

TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.

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

15 years agoModify the Indexer class so that it can return the TranslationUnit that internal
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:52 +0000 (23:39 +0000)]
Modify the Indexer class so that it can return the TranslationUnit that internal
decls originated from.

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

15 years agoAdd Entity::getInternalDecl() to be used only on Entities that refer to internal
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:42 +0000 (23:39 +0000)]
Add Entity::getInternalDecl() to be used only on Entities that refer to internal
(in translation unit) declarations.

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

15 years agoConstify ASTLocation::print.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:35 +0000 (23:39 +0000)]
Constify ASTLocation::print.

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

15 years agoFix some comments.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:25 +0000 (23:39 +0000)]
Fix some comments.

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

15 years agoAdd getDeclReferenceMap() to the abstract interface of TranslationUnit class.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:18 +0000 (23:39 +0000)]
Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.

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

15 years agoRemove the TranslationUnit usage from clang-wpa.cpp since it's not really
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:09 +0000 (23:39 +0000)]
Remove the TranslationUnit usage from clang-wpa.cpp since it's not really
necessary.

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

15 years agoIntroduce a helper template for the Handler classes and use it instead
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:03 +0000 (23:39 +0000)]
Introduce a helper template for the Handler classes and use it instead
of the iterator of the Indexer class.

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

15 years agoAdd an assert.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:51 +0000 (23:38 +0000)]
Add an assert.

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

15 years agoAccept Handler objects in parameters as references.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:45 +0000 (23:38 +0000)]
Accept Handler objects in parameters as references.

Reinforces that they shouldn't be null and it's a bit more natural when
they are passed as stack objects.

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

15 years agoRename EntityHandler::HandleEntity to Handle.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:35 +0000 (23:38 +0000)]
Rename EntityHandler::HandleEntity to Handle.

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

15 years ago-Make IndexProvider an abstract interface for getting indexing information.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:21 +0000 (23:38 +0000)]
-Make IndexProvider an abstract interface for getting indexing information.
-Introduce Indexer as an IndexProvider implementation.

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

15 years agoMake tag declarations redeclarable. This change has three purposes:
Douglas Gregor [Wed, 29 Jul 2009 23:36:44 +0000 (23:36 +0000)]
Make tag declarations redeclarable. This change has three purposes:

  1) Allow the Index library (and any other interested client) to walk
  the set of declarations for a given tag (enum, union, class,
  whatever). At the moment, this information is not readily available.

  2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
  to a TagType (for which getDecl() will return the tag definition, if
  one exists). This property won't exist for class template partial
  specializations.

  3) Make the canonical declaration of a TagDecl actually canonical,
  e.g., so that it does not change when the tag is defined.

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

15 years agoEliminate an unused-variable warning
Douglas Gregor [Wed, 29 Jul 2009 22:40:58 +0000 (22:40 +0000)]
Eliminate an unused-variable warning

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