]> granicus.if.org Git - clang/log
clang
15 years agoreduce redundant are's
Chris Lattner [Wed, 20 Jan 2010 17:53:58 +0000 (17:53 +0000)]
reduce redundant are's

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

15 years agoImprove performance of warning when not implementing a required
Fariborz Jahanian [Wed, 20 Jan 2010 17:27:59 +0000 (17:27 +0000)]
Improve performance of warning when not implementing a required
property of a protocol (my previous patch). No change in functionality.
(radar 7544809).

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

15 years agoMake some helper functions static.
Benjamin Kramer [Wed, 20 Jan 2010 16:21:40 +0000 (16:21 +0000)]
Make some helper functions static.

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

15 years agoDon't store a Twine temporary, it's unsafe.
Benjamin Kramer [Wed, 20 Jan 2010 16:18:11 +0000 (16:18 +0000)]
Don't store a Twine temporary, it's unsafe.

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

15 years agoFix html glitch. Pointed out by clwi (PR6090).
Duncan Sands [Wed, 20 Jan 2010 12:40:56 +0000 (12:40 +0000)]
Fix html glitch.  Pointed out by clwi (PR6090).

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

15 years agoCorrect comments.
Zhongxing Xu [Wed, 20 Jan 2010 07:57:45 +0000 (07:57 +0000)]
Correct comments.

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

15 years agoallow this test to pass, even with the recent .s printer changes.
Chris Lattner [Wed, 20 Jan 2010 07:45:09 +0000 (07:45 +0000)]
allow this test to pass, even with the recent .s printer changes.
Have I ever mentioned that clang regtests should not be grepping .s files??

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

15 years agoFix a typo pointed about by gabor.
Chandler Carruth [Wed, 20 Jan 2010 07:43:54 +0000 (07:43 +0000)]
Fix a typo pointed about by gabor.

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

15 years agoMove the MacroBuilder utilitiy to its own header. Update references.
Chandler Carruth [Wed, 20 Jan 2010 06:13:02 +0000 (06:13 +0000)]
Move the MacroBuilder utilitiy to its own header. Update references.

Comments and/or improvements to the documentation are welcome.

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

15 years agoFix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
Daniel Dunbar [Wed, 20 Jan 2010 06:09:53 +0000 (06:09 +0000)]
Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
temporaries (this is one reason I'm nervous about propagating their use beyond
particularly performance critical places).

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

15 years agoActually remove the include that r93974 made unnecessary.
Chandler Carruth [Wed, 20 Jan 2010 04:09:11 +0000 (04:09 +0000)]
Actually remove the include that r93974 made unnecessary.

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

15 years agoFix a layering issue between Basic and FE by moving a utility class into Basic.
Chandler Carruth [Wed, 20 Jan 2010 03:59:11 +0000 (03:59 +0000)]
Fix a layering issue between Basic and FE by moving a utility class into Basic.

This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.

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

15 years agoAdd a missing case for DeclContext printer.
Zhongxing Xu [Wed, 20 Jan 2010 03:21:28 +0000 (03:21 +0000)]
Add a missing case for DeclContext printer.

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

15 years agoDriver: Lift clang resource directory computation to the Driver object.
Daniel Dunbar [Wed, 20 Jan 2010 02:35:16 +0000 (02:35 +0000)]
Driver: Lift clang resource directory computation to the Driver object.

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

15 years agoclang/Darwin: Update for rename of 10.4 static runtime library.
Daniel Dunbar [Wed, 20 Jan 2010 02:35:02 +0000 (02:35 +0000)]
clang/Darwin: Update for rename of 10.4 static runtime library.

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

15 years agoAlso handle CXXConstructor, CXXDestructor and CXXConversion in CFG
Mike Stump [Wed, 20 Jan 2010 02:28:05 +0000 (02:28 +0000)]
Also handle CXXConstructor, CXXDestructor and CXXConversion in CFG
printing.

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

15 years agoUse the llvm coding convention for indentation for switch.
Mike Stump [Wed, 20 Jan 2010 02:03:14 +0000 (02:03 +0000)]
Use the llvm coding convention for indentation for switch.

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

15 years agoPatch to implement required warnings for unimplemented
Fariborz Jahanian [Wed, 20 Jan 2010 01:51:55 +0000 (01:51 +0000)]
Patch to implement required warnings for unimplemented
properties imported frfom protocol. Fixes radar 7544809.

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

15 years agoMake UnresolvedSet.h standalone.
John McCall [Wed, 20 Jan 2010 01:36:13 +0000 (01:36 +0000)]
Make UnresolvedSet.h standalone.

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

15 years agoWire up the EH context for the catch clauses to the outer EH context. WIP.
Mike Stump [Wed, 20 Jan 2010 01:30:58 +0000 (01:30 +0000)]
Wire up the EH context for the catch clauses to the outer EH context.  WIP.

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

15 years agoAdd an exceptional edge from the try terminated block to the outer EH
Mike Stump [Wed, 20 Jan 2010 01:15:34 +0000 (01:15 +0000)]
Add an exceptional edge from the try terminated block to the outer EH
context (try or the Exit block) when there isn't a catch (...).

Improve CFG printing for catch (...).

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

15 years agoAttempt to improve CIndex Doxygen organization, although I can't actually test this...
Douglas Gregor [Wed, 20 Jan 2010 01:10:47 +0000 (01:10 +0000)]
Attempt to improve CIndex Doxygen organization, although I can't actually test this locally

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

15 years agoGive UnresolvedSet the ability to store access specifiers for each declaration.
John McCall [Wed, 20 Jan 2010 00:46:10 +0000 (00:46 +0000)]
Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet.  Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.

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

15 years agoRemove some #if 0'd code that's never going to get used.
Douglas Gregor [Wed, 20 Jan 2010 00:34:08 +0000 (00:34 +0000)]
Remove some #if 0'd code that's never going to get used.

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

15 years agoImprove CheckFallThrough analysis in the presense of the new C++ EH
Mike Stump [Wed, 20 Jan 2010 00:34:04 +0000 (00:34 +0000)]
Improve CheckFallThrough analysis in the presense of the new C++ EH
support.  WIP.

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

15 years agoKill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
Douglas Gregor [Wed, 20 Jan 2010 00:26:57 +0000 (00:26 +0000)]
Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.

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

15 years agoIntroduce a special cursor kind for the translation unit, to serve as
Douglas Gregor [Wed, 20 Jan 2010 00:23:15 +0000 (00:23 +0000)]
Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.

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

15 years agoCXCursor_UnexposedDecl to the first declaration kind
Douglas Gregor [Wed, 20 Jan 2010 00:07:45 +0000 (00:07 +0000)]
CXCursor_UnexposedDecl to the first declaration kind

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

15 years agoadd support for Fedora 10 x86_64, there really should be a better way to handle this.
Chris Lattner [Tue, 19 Jan 2010 23:30:00 +0000 (23:30 +0000)]
add support for Fedora 10 x86_64, there really should be a better way to handle this.
patch by Dmitry

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

15 years agoKill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
Douglas Gregor [Tue, 19 Jan 2010 23:25:01 +0000 (23:25 +0000)]
Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.

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

15 years agoExtend the CIndex API with direct support for expressions and
Douglas Gregor [Tue, 19 Jan 2010 23:20:36 +0000 (23:20 +0000)]
Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).

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

15 years agoImplement goto inside of blocks.
Mike Stump [Tue, 19 Jan 2010 23:08:01 +0000 (23:08 +0000)]
Implement goto inside of blocks.

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

15 years agoUpdate and move around comments.
Eric Christopher [Tue, 19 Jan 2010 22:58:35 +0000 (22:58 +0000)]
Update and move around comments.

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

15 years agoThe type of a compound literal expression is not necessarily the same as the
John McCall [Tue, 19 Jan 2010 22:33:45 +0000 (22:33 +0000)]
The type of a compound literal expression is not necessarily the same as the
type which was syntactically written.  Fixes PR 6080.

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

15 years agoKill the unused and unnecessary CXCursor_MemberRef, twin to the
Douglas Gregor [Tue, 19 Jan 2010 22:15:34 +0000 (22:15 +0000)]
Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.

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

15 years agoKill CXCursor_ObjCIvarRef. Such cursors could never be created, and
Douglas Gregor [Tue, 19 Jan 2010 22:11:32 +0000 (22:11 +0000)]
Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.

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

15 years agoIntroduce the notion of an "unexposed" declaration into the CIndex
Douglas Gregor [Tue, 19 Jan 2010 22:07:56 +0000 (22:07 +0000)]
Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.

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

15 years agoAdd CFG support for the start and end of scopes and infrastructure for
Mike Stump [Tue, 19 Jan 2010 22:00:14 +0000 (22:00 +0000)]
Add CFG support for the start and end of scopes and infrastructure for
implicit destructor calls.  WIP.

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

15 years agoRewriteing of gnu extension __typeof in objective-c rewriter.
Fariborz Jahanian [Tue, 19 Jan 2010 21:48:35 +0000 (21:48 +0000)]
Rewriteing of gnu extension __typeof in objective-c rewriter.
Fixes radar 6358225.

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

15 years agoRework the CXSourceLocation and CXSourceRange APIs. They are now
Douglas Gregor [Tue, 19 Jan 2010 21:36:55 +0000 (21:36 +0000)]
Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.

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

15 years agoDon't try to build/install/clean compiler-rt stuff if it isn't in the projects directory.
Daniel Dunbar [Tue, 19 Jan 2010 21:28:04 +0000 (21:28 +0000)]
Don't try to build/install/clean compiler-rt stuff if it isn't in the projects directory.

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

15 years agoInitial cut at integrating compiler-rt (on Darwin) w/ clang build.
Daniel Dunbar [Tue, 19 Jan 2010 21:12:58 +0000 (21:12 +0000)]
Initial cut at integrating compiler-rt (on Darwin) w/ clang build.
 - compiler-rt should be checked out into $LLVM_SRC_ROOT/projects/compiler-rt.

 - On Darwin, this will automatically build the runtime libraries clang needs
   into $OBJROOT/lib/clang/<version>/darwin/...

 - The mechanism can easily support other platforms, and can eventually support
   multiple platforms once clang has some kind of configure process (for
   specifying the desired targets).

 - Feedback on the approach is welcome.

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

15 years agoTighten code and rework indentation of some if() branches (for readability). No...
Ted Kremenek [Tue, 19 Jan 2010 20:52:05 +0000 (20:52 +0000)]
Tighten code and rework indentation of some if() branches (for readability).  No functionality change.

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

15 years agoRemove extra space in uses of 'assert()'.
Ted Kremenek [Tue, 19 Jan 2010 20:46:35 +0000 (20:46 +0000)]
Remove extra space in uses of 'assert()'.

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

15 years agoRe-alphabetize cases in switch statement.
Ted Kremenek [Tue, 19 Jan 2010 20:40:33 +0000 (20:40 +0000)]
Re-alphabetize cases in switch statement.

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

15 years agoEliminate cursor kinds used to express definitions. Instead, provide
Douglas Gregor [Tue, 19 Jan 2010 19:34:47 +0000 (19:34 +0000)]
Eliminate cursor kinds used to express definitions. Instead, provide
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.

This is another API + ABI breaker with no deprecation. Yay, progress.

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

15 years agoobjective-c test case for __attribute__((unused)) on method arguments.
Fariborz Jahanian [Tue, 19 Jan 2010 18:39:17 +0000 (18:39 +0000)]
objective-c test case for __attribute__((unused)) on method arguments.

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

15 years agoIssue diagnostics (instead of crashing in code gen) when using
Fariborz Jahanian [Tue, 19 Jan 2010 17:48:02 +0000 (17:48 +0000)]
Issue diagnostics (instead of crashing in code gen) when using
property dot-syntax notation to use setter/getters in objective-c.
Fixes radar 7553050.

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

15 years agoAvoid an instantiation of std::sort.
Benjamin Kramer [Tue, 19 Jan 2010 17:42:20 +0000 (17:42 +0000)]
Avoid an instantiation of std::sort.

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

15 years agoTeach Sema::ActOnDependentTemplateName that a dependent template name
Douglas Gregor [Tue, 19 Jan 2010 16:01:07 +0000 (16:01 +0000)]
Teach Sema::ActOnDependentTemplateName that a dependent template name
in a member access expression referring into the current instantiation
need not be resolved at template definition *if* the current
instantiation has any dependent base classes. Fixes PR6081.

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

15 years agoAdd test case.
Zhongxing Xu [Tue, 19 Jan 2010 12:11:55 +0000 (12:11 +0000)]
Add test case.

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

15 years agoFix a serious bug: Tmp3 is the wrong destination set. We should create a new
Zhongxing Xu [Tue, 19 Jan 2010 09:25:53 +0000 (09:25 +0000)]
Fix a serious bug: Tmp3 is the wrong destination set. We should create a new
intermediate destination set Tmp4.

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

15 years agoAnother test case for PR6062
Douglas Gregor [Tue, 19 Jan 2010 06:47:24 +0000 (06:47 +0000)]
Another test case for PR6062

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

15 years agoIn a mem-initializer, a nested-name-specifier followed by an
Douglas Gregor [Tue, 19 Jan 2010 06:46:48 +0000 (06:46 +0000)]
In a mem-initializer, a nested-name-specifier followed by an
identifier always names a type. In the case of a dependent
nested-name-specifier, build a TypenameType to describe the dependent
base type. I'd like to move more of this behavior up into the parser,
but this fixes PR6062.

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

15 years agoWhen looking up enumerator names for redeclaration, use the
Douglas Gregor [Tue, 19 Jan 2010 06:06:57 +0000 (06:06 +0000)]
When looking up enumerator names for redeclaration, use the
ForRedeclaration flag so that we don't look into base classes.
Fixes PR6061.

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

15 years agoUpdate Xcode project.
Anders Carlsson [Tue, 19 Jan 2010 06:04:24 +0000 (06:04 +0000)]
Update Xcode project.

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

15 years agoAdd try/catch CFG support. Also improve throw CFG support. WIP.
Mike Stump [Tue, 19 Jan 2010 02:20:09 +0000 (02:20 +0000)]
Add try/catch CFG support.  Also improve throw CFG support.  WIP.

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

15 years agoEmit human readable names for operators.
Devang Patel [Tue, 19 Jan 2010 02:02:11 +0000 (02:02 +0000)]
Emit human readable names for operators.

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

15 years agoFirst cut at emitting debugging information for C++ member functions.
Devang Patel [Tue, 19 Jan 2010 01:54:44 +0000 (01:54 +0000)]
First cut at emitting debugging information for C++ member functions.
There is lot more work to do in this area.

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

15 years agoFix possible memory leak by using an OwningPtr.
Ted Kremenek [Tue, 19 Jan 2010 01:29:05 +0000 (01:29 +0000)]
Fix possible memory leak by using an OwningPtr.

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

15 years agoIntroduce clang_getCursorReferenced, to get a cursor pointing at the
Douglas Gregor [Tue, 19 Jan 2010 01:20:04 +0000 (01:20 +0000)]
Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.

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

15 years agoImplement clang_getCursorExtent, which provides a source range for the
Douglas Gregor [Tue, 19 Jan 2010 00:34:46 +0000 (00:34 +0000)]
Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.

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

15 years agoUse llvm::Function name as the linkage name, but strip off leading '01' from display...
Devang Patel [Tue, 19 Jan 2010 00:25:12 +0000 (00:25 +0000)]
Use llvm::Function name as the linkage name, but strip off leading '01' from display name.

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

15 years agoRefactor.
Devang Patel [Tue, 19 Jan 2010 00:00:59 +0000 (00:00 +0000)]
Refactor.

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

15 years agoTeach clang_getCursorLocation() to return the locations of references
Douglas Gregor [Mon, 18 Jan 2010 23:41:10 +0000 (23:41 +0000)]
Teach clang_getCursorLocation() to return the locations of references
rather than the locations that refer to.

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

15 years agollvm::Function name is the linkage name. If it has a '01' as a prefix then probably...
Devang Patel [Mon, 18 Jan 2010 23:27:28 +0000 (23:27 +0000)]
llvm::Function name is the linkage name. If it has a '01' as a prefix then probably there is a reason.

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

15 years agoTweak USR output for ObjC categories.
Ted Kremenek [Mon, 18 Jan 2010 23:25:32 +0000 (23:25 +0000)]
Tweak USR output for ObjC categories.

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

15 years agoMove AccessSpecifier into the new Specifiers.h; fixes the layering violations
John McCall [Mon, 18 Jan 2010 23:21:37 +0000 (23:21 +0000)]
Move AccessSpecifier into the new Specifiers.h;  fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.

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

15 years agoAllow conversion of pointer to an objective-c pointer to
Fariborz Jahanian [Mon, 18 Jan 2010 22:59:22 +0000 (22:59 +0000)]
Allow conversion of pointer to an objective-c pointer to
a similar pointer. Fixes radar 7552179.

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

15 years agoNow that a reasonable deprecation cycle has passed, kill
Douglas Gregor [Mon, 18 Jan 2010 22:48:04 +0000 (22:48 +0000)]
Now that a reasonable deprecation cycle has passed, kill
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.

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

15 years agoIntroduce clang_getCursorLocation(), which supercedes
Douglas Gregor [Mon, 18 Jan 2010 22:46:11 +0000 (22:46 +0000)]
Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.

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

15 years agoRefactor USR generation for TagDecls into a common method.
Ted Kremenek [Mon, 18 Jan 2010 22:42:20 +0000 (22:42 +0000)]
Refactor USR generation for TagDecls into a common method.

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

15 years agoallow the HandlerComment callback to push tokens into the
Chris Lattner [Mon, 18 Jan 2010 22:35:47 +0000 (22:35 +0000)]
allow the HandlerComment callback to push tokens into the
preprocessor.  This could be used by an OpenMP implementation
or something.  Patch by Abramo Bagnara!

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

15 years agosimplify the code for skipping in a #if 0 block. The CurLexer
Chris Lattner [Mon, 18 Jan 2010 22:33:01 +0000 (22:33 +0000)]
simplify the code for skipping in a #if 0 block.  The CurLexer
pointer is always non-null because the PTH case exits earlier
in the method.

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

15 years agoClean up the CIndex API slightly.
Douglas Gregor [Mon, 18 Jan 2010 22:13:09 +0000 (22:13 +0000)]
Clean up the CIndex API slightly.

Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.

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

15 years agoExplicitly not handle ObjCForwardProtocolDecl in GetCursorKind().
Ted Kremenek [Mon, 18 Jan 2010 22:07:45 +0000 (22:07 +0000)]
Explicitly not handle ObjCForwardProtocolDecl in GetCursorKind().

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

15 years agoTweak USR generation to handle anonymous bitfields.
Ted Kremenek [Mon, 18 Jan 2010 22:02:49 +0000 (22:02 +0000)]
Tweak USR generation to handle anonymous bitfields.

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

15 years agoAdd missing newline.
Daniel Dunbar [Mon, 18 Jan 2010 20:55:52 +0000 (20:55 +0000)]
Add missing newline.

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

15 years agofloat, double, and long double do need extra data in the
Douglas Gregor [Mon, 18 Jan 2010 20:37:56 +0000 (20:37 +0000)]
float, double, and long double do need extra data in the
BuiltinTypeLoc structure. Thanks, Enea!

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

15 years agoReplace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts...
Ted Kremenek [Mon, 18 Jan 2010 20:23:29 +0000 (20:23 +0000)]
Replace clang_getDeclUSR() with clang_getCursorUSR().  Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.

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

15 years agoPreserve type source information in compound literal expressions.
John McCall [Mon, 18 Jan 2010 19:35:47 +0000 (19:35 +0000)]
Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!

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

15 years agoPrint fix-it hints properly around tabs, from Christian Adåker!
Douglas Gregor [Mon, 18 Jan 2010 19:28:01 +0000 (19:28 +0000)]
Print fix-it hints properly around tabs, from Christian Adåker!

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

15 years agoRemove ../libexec from clang program search path, clang-cc is dead.
Daniel Dunbar [Mon, 18 Jan 2010 19:16:53 +0000 (19:16 +0000)]
Remove ../libexec from clang program search path, clang-cc is dead.

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

15 years agoSilence a control reaches end of function warning. Patch by Enea
Mike Stump [Mon, 18 Jan 2010 18:41:43 +0000 (18:41 +0000)]
Silence a control reaches end of function warning.  Patch by Enea
Zaffanella.

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

15 years agoMostly renaming some methods and updating comments to
Fariborz Jahanian [Mon, 18 Jan 2010 18:41:16 +0000 (18:41 +0000)]
Mostly renaming some methods and updating comments to
reflect what these methods are actually doing. One method
template for future work. No change in functionality.

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

15 years agoMake CMake's clang++ installation respect DESTDIR, based on a patch by
Douglas Gregor [Mon, 18 Jan 2010 18:27:29 +0000 (18:27 +0000)]
Make CMake's clang++ installation respect DESTDIR, based on a patch by
Ingmar Vanhassel. Fixes PR6046.

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

15 years agoImprove source-location information for builtin TypeLocs, from Enea
Douglas Gregor [Mon, 18 Jan 2010 18:04:31 +0000 (18:04 +0000)]
Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).

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

15 years agoDon't build/install clang++ in CLANG_IS_PRODUCTION build mode yet.
Daniel Dunbar [Mon, 18 Jan 2010 17:52:48 +0000 (17:52 +0000)]
Don't build/install clang++ in CLANG_IS_PRODUCTION build mode yet.

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

15 years agoFix -Asserts warning.
Daniel Dunbar [Mon, 18 Jan 2010 17:52:42 +0000 (17:52 +0000)]
Fix -Asserts warning.

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

15 years agoFix race condition in creating objdir.
Daniel Dunbar [Mon, 18 Jan 2010 17:52:37 +0000 (17:52 +0000)]
Fix race condition in creating objdir.

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

15 years agoEncoding calling conventions in the type system, from Charles Davis!
Douglas Gregor [Mon, 18 Jan 2010 17:14:39 +0000 (17:14 +0000)]
Encoding calling conventions in the type system, from Charles Davis!

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

15 years agoMore VTT builder fixes. With these fixes we now correctly handle the very complex...
Anders Carlsson [Mon, 18 Jan 2010 17:13:59 +0000 (17:13 +0000)]
More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.

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

15 years agoAdd support for computing size in elements for symbolic regions obtained from
Zhongxing Xu [Mon, 18 Jan 2010 08:54:31 +0000 (08:54 +0000)]
Add support for computing size in elements for symbolic regions obtained from
malloc().

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

15 years agoMove some common code into BuildVTT.
Anders Carlsson [Mon, 18 Jan 2010 04:45:46 +0000 (04:45 +0000)]
Move some common code into BuildVTT.

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

15 years agoFix a bunch of VTT layout bugs, add simple tests for VTT layout.
Anders Carlsson [Mon, 18 Jan 2010 04:25:18 +0000 (04:25 +0000)]
Fix a bunch of VTT layout bugs, add simple tests for VTT layout.

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

15 years agoAdd test case for pr6069.
Zhongxing Xu [Mon, 18 Jan 2010 04:01:40 +0000 (04:01 +0000)]
Add test case for pr6069.

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

15 years agoUpdate virt.cpp for changes to the LLVM asm printer (?) This test should really be...
Anders Carlsson [Mon, 18 Jan 2010 03:58:13 +0000 (03:58 +0000)]
Update virt.cpp for changes to the LLVM asm printer (?) This test should really be all LLVM IR...

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

15 years agoIf the symbol has not been tracked, do not free it. This is possible when free
Zhongxing Xu [Mon, 18 Jan 2010 03:27:34 +0000 (03:27 +0000)]
If the symbol has not been tracked, do not free it. This is possible when free
is called on a pointer that does not get its value directly from malloc.

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

15 years agoMinor VTT builder cleanup, no functionality change.
Anders Carlsson [Sun, 17 Jan 2010 23:53:20 +0000 (23:53 +0000)]
Minor VTT builder cleanup, no functionality change.

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

15 years agoGet the ctor vtable address points directly from the VTT builder.
Anders Carlsson [Sun, 17 Jan 2010 17:10:44 +0000 (17:10 +0000)]
Get the ctor vtable address points directly from the VTT builder.

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