]> granicus.if.org Git - clang/log
clang
15 years agoRemove unnecessary &&s.
Daniel Dunbar [Tue, 17 Nov 2009 22:25:07 +0000 (22:25 +0000)]
Remove unnecessary &&s.

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

15 years agoMore cases for weak_import objective-c2 classes.
Fariborz Jahanian [Tue, 17 Nov 2009 22:02:21 +0000 (22:02 +0000)]
More cases for weak_import objective-c2 classes.
(still radar 6815425).

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

15 years agoFix -Asserts warning.
Daniel Dunbar [Tue, 17 Nov 2009 21:51:03 +0000 (21:51 +0000)]
Fix -Asserts warning.

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

15 years agoAdd rtti support for non-member pointers. WIP.
Mike Stump [Tue, 17 Nov 2009 21:44:24 +0000 (21:44 +0000)]
Add rtti support for non-member pointers.  WIP.

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

15 years agoMore support for weak_import objective-c2 class.
Fariborz Jahanian [Tue, 17 Nov 2009 21:37:35 +0000 (21:37 +0000)]
More support for weak_import objective-c2 class.
(radar 6815425).

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

15 years agoImprove location information when adding conversion candidates
Douglas Gregor [Tue, 17 Nov 2009 21:16:22 +0000 (21:16 +0000)]
Improve location information when adding conversion candidates

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

15 years agofgetln is a BSDism; replace it with more portable code.
Benjamin Kramer [Tue, 17 Nov 2009 20:51:40 +0000 (20:51 +0000)]
fgetln is a BSDism; replace it with more portable code.

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

15 years agoAdd c-index-test mode "-test-file-scan", which scans a source file and calls clang_ge...
Ted Kremenek [Tue, 17 Nov 2009 19:37:36 +0000 (19:37 +0000)]
Add c-index-test mode "-test-file-scan", which scans a source file and calls clang_getCursor() on every character.

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

15 years agoFix test case.
Ted Kremenek [Tue, 17 Nov 2009 19:36:36 +0000 (19:36 +0000)]
Fix test case.

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

15 years agoAdded block type introspection support.
David Chisnall [Tue, 17 Nov 2009 19:33:30 +0000 (19:33 +0000)]
Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.

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

15 years agoFixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.
David Chisnall [Tue, 17 Nov 2009 19:32:15 +0000 (19:32 +0000)]
Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.

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

15 years agoRename test.
Ted Kremenek [Tue, 17 Nov 2009 19:29:41 +0000 (19:29 +0000)]
Rename test.

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

15 years agoAdd clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).
Ted Kremenek [Tue, 17 Nov 2009 19:28:59 +0000 (19:28 +0000)]
Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).

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

15 years agoUndo previous test fix. -split-phi-edges now disables automatically when the
Jakob Stoklund Olesen [Tue, 17 Nov 2009 19:18:32 +0000 (19:18 +0000)]
Undo previous test fix. -split-phi-edges now disables automatically when the
local register allocator is used.

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

15 years agoStart support of weak_import objective-c classes.
Fariborz Jahanian [Tue, 17 Nov 2009 19:08:08 +0000 (19:08 +0000)]
Start support of weak_import objective-c classes.
(Radar 6815425).

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

15 years agoReplace (-INT8_C(128)), which uses an illegally out-of-range argument for
Ken Dyck [Tue, 17 Nov 2009 18:29:12 +0000 (18:29 +0000)]
Replace (-INT8_C(128)), which uses an illegally out-of-range argument for
INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar
changes to the definitions of INT16_MIN and INT24_MIN.

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

15 years agoAllow "source_filename" to be an optional argument (the client can provide NULL)...
Ted Kremenek [Tue, 17 Nov 2009 18:18:02 +0000 (18:18 +0000)]
Allow "source_filename" to be an optional argument (the client can provide NULL).  This allows the client to put the source_filename in the command_line_args without fear of the file being named twice.

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

15 years agoOrganize c-index-test into logic sections, and add section headers.
Ted Kremenek [Tue, 17 Nov 2009 18:13:31 +0000 (18:13 +0000)]
Organize c-index-test into logic sections, and add section headers.

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

15 years agoClean up c-index-test command line usage a bit by requiring a "-test-load-tu" option...
Ted Kremenek [Tue, 17 Nov 2009 18:09:14 +0000 (18:09 +0000)]
Clean up c-index-test command line usage a bit by requiring a "-test-load-tu" option when testing clang_loadTranslationUnit().  Running c-index-test without the correct arguments now also prints a useful summary of its correct usage.

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

15 years agoAdjust format attribute index for implicit object arguments. Fixes PR5521.
Sebastian Redl [Tue, 17 Nov 2009 18:02:24 +0000 (18:02 +0000)]
Adjust format attribute index for implicit object arguments. Fixes PR5521.

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

15 years agoImplement code completion for Objective-C message sends to "super".
Douglas Gregor [Tue, 17 Nov 2009 17:59:40 +0000 (17:59 +0000)]
Implement code completion for Objective-C message sends to "super".

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

15 years agoFixes a typo, reported by Doug.
Fariborz Jahanian [Tue, 17 Nov 2009 17:15:16 +0000 (17:15 +0000)]
Fixes a typo, reported by Doug.

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

15 years agoFix PR5531.
Anders Carlsson [Tue, 17 Nov 2009 17:11:23 +0000 (17:11 +0000)]
Fix PR5531.

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

15 years agoMake sure, for sure this time, that expressions do not have reference type
Douglas Gregor [Tue, 17 Nov 2009 16:44:57 +0000 (16:44 +0000)]
Make sure, for sure this time, that expressions do not have reference type

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

15 years agoAugment code-completion results to provide argument names and
Douglas Gregor [Tue, 17 Nov 2009 16:44:22 +0000 (16:44 +0000)]
Augment code-completion results to provide argument names and
placeholder arguments for Objective-C message sends.

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

15 years agoStringRef'ify CodeCompletionString
Douglas Gregor [Tue, 17 Nov 2009 16:43:05 +0000 (16:43 +0000)]
StringRef'ify CodeCompletionString

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

15 years agoUse the INTn_C integer constant macros to generate limit constants with correct
Ken Dyck [Tue, 17 Nov 2009 16:26:27 +0000 (16:26 +0000)]
Use the INTn_C integer constant macros to generate limit constants with correct
suffixes. This corrects the suffixes for the limit constants of the 32-bit
types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64.

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

15 years agorecognize .hpp as c++ (needed for ./configure'ing boost)
Nuno Lopes [Tue, 17 Nov 2009 15:36:35 +0000 (15:36 +0000)]
recognize .hpp as c++ (needed for ./configure'ing boost)

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

15 years agoadd Fedora 11 include path. what a crap..
Nuno Lopes [Tue, 17 Nov 2009 15:28:35 +0000 (15:28 +0000)]
add Fedora 11 include path.  what a crap..

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

15 years agoMake test header independent so it doesn't fail on freebsd. I hope this doesn't
Benjamin Kramer [Tue, 17 Nov 2009 14:02:16 +0000 (14:02 +0000)]
Make test header independent so it doesn't fail on freebsd. I hope this doesn't
hurt the intention of the test.

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

15 years agoRemove unnecessary parens around the bodies of integer constant macros. C99
Ken Dyck [Tue, 17 Nov 2009 13:54:02 +0000 (13:54 +0000)]
Remove unnecessary parens around the bodies of integer constant macros. C99
requires that their arguments be decimal, hex, octal constants---no signs
allowed---making the parens unnecessary.

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

15 years agoFix MSVC warning.
Benjamin Kramer [Tue, 17 Nov 2009 11:15:38 +0000 (11:15 +0000)]
Fix MSVC warning.

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

15 years agoTemporarily unbreak the clang-on-llvm tests. :) Not going to fix unresolved
John McCall [Tue, 17 Nov 2009 10:36:41 +0000 (10:36 +0000)]
Temporarily unbreak the clang-on-llvm tests. :)  Not going to fix unresolved
lookup all in a night.

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

15 years ago... and add back a few more triple forces.
Daniel Dunbar [Tue, 17 Nov 2009 10:27:58 +0000 (10:27 +0000)]
... and add back a few more triple forces.

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

15 years agoRemove stale reference to old WPA dir, patch by Kovarththanan Rajaratnam.
Daniel Dunbar [Tue, 17 Nov 2009 10:15:57 +0000 (10:15 +0000)]
Remove stale reference to old WPA dir, patch by Kovarththanan Rajaratnam.

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

15 years agoUse clang to run tests which include headers from the system.
Daniel Dunbar [Tue, 17 Nov 2009 10:14:55 +0000 (10:14 +0000)]
Use clang to run tests which include headers from the system.

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

15 years agoAdd some -triples I was a little too liberal in removing.
Daniel Dunbar [Tue, 17 Nov 2009 10:04:38 +0000 (10:04 +0000)]
Add some -triples I was a little too liberal in removing.

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

15 years agoMerge several visibility tests into hidden-visibility.m, and check .ll output
Daniel Dunbar [Tue, 17 Nov 2009 10:04:28 +0000 (10:04 +0000)]
Merge several visibility tests into hidden-visibility.m, and check .ll output
not .s output.

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

15 years agoAdd missed CMake file for adding clang examples to CMake build.
Daniel Dunbar [Tue, 17 Nov 2009 09:40:40 +0000 (09:40 +0000)]
Add missed CMake file for adding clang examples to CMake build.

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

15 years agoSkip over shadow using decls during codegen.
John McCall [Tue, 17 Nov 2009 09:33:40 +0000 (09:33 +0000)]
Skip over shadow using decls during codegen.

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

15 years agoAdd optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.
Daniel Dunbar [Tue, 17 Nov 2009 09:32:51 +0000 (09:32 +0000)]
Add optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.

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

15 years agoSimplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.
Daniel Dunbar [Tue, 17 Nov 2009 09:15:57 +0000 (09:15 +0000)]
Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.

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

15 years agoEliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
Daniel Dunbar [Tue, 17 Nov 2009 09:15:44 +0000 (09:15 +0000)]
Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
in the driver.

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

15 years agoUse -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead...
Daniel Dunbar [Tue, 17 Nov 2009 09:04:12 +0000 (09:04 +0000)]
Use -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead of forcing the triple.

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

15 years agoAdd PreVisitReturn to Malloc checker. Now we can recognize returned memory
Zhongxing Xu [Tue, 17 Nov 2009 08:58:18 +0000 (08:58 +0000)]
Add PreVisitReturn to Malloc checker. Now we can recognize returned memory
block.

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

15 years agoDon't #include <stdio.h> when tests don't need it, or use clang instead of clang...
Daniel Dunbar [Tue, 17 Nov 2009 08:57:36 +0000 (08:57 +0000)]
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.

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

15 years agoRemove some redundant tests.
Daniel Dunbar [Tue, 17 Nov 2009 08:57:06 +0000 (08:57 +0000)]
Remove some redundant tests.

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

15 years agoCommit this random test case.
John McCall [Tue, 17 Nov 2009 08:57:02 +0000 (08:57 +0000)]
Commit this random test case.

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

15 years agoAdd -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
Daniel Dunbar [Tue, 17 Nov 2009 08:07:36 +0000 (08:07 +0000)]
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
 - Remove unused -fobjc-tight-layout while at it.

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

15 years agoAdd driver::types::isObjC predicate.
Daniel Dunbar [Tue, 17 Nov 2009 08:07:16 +0000 (08:07 +0000)]
Add driver::types::isObjC predicate.

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

15 years agoAdd EvalEndPath interface to Checker. Now we can check memory leaked at the
Zhongxing Xu [Tue, 17 Nov 2009 07:54:15 +0000 (07:54 +0000)]
Add EvalEndPath interface to Checker. Now we can check memory leaked at the
end of the path. Need to unify interfaces.

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

15 years agoStore "sugared" decls in LookupResults (i.e. decl aliases like using declarations);
John McCall [Tue, 17 Nov 2009 07:50:12 +0000 (07:50 +0000)]
Store "sugared" decls in LookupResults (i.e. decl aliases like using declarations);
strip the sugar off in getFoundDecl() and getAsSingleDecl(), but leave it on for
clients like overload resolution who want to use the iterators.

Refactor a few pieces of overload resolution to strip off using declarations in
a single place.  Don't do anything useful with the extra context knowledge yet.

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

15 years agoClear the dest set.
Zhongxing Xu [Tue, 17 Nov 2009 07:19:51 +0000 (07:19 +0000)]
Clear the dest set.

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

15 years agoMove -fnext-runtime defaulting to driver (and change clang-cc default to
Daniel Dunbar [Tue, 17 Nov 2009 07:07:28 +0000 (07:07 +0000)]
Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

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

15 years agoMove -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
Daniel Dunbar [Tue, 17 Nov 2009 07:06:20 +0000 (07:06 +0000)]
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

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

15 years agoSort visitor methods. No functionality change.
Ted Kremenek [Tue, 17 Nov 2009 07:02:15 +0000 (07:02 +0000)]
Sort visitor methods.  No functionality change.

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

15 years agoBe more careful with anonymous namespaces, since Clang diagnoses the ambiguity here
Douglas Gregor [Tue, 17 Nov 2009 06:52:37 +0000 (06:52 +0000)]
Be more careful with anonymous namespaces, since Clang diagnoses the ambiguity here

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

15 years agoMove char-is-signed defaulting to driver, instead of using
Daniel Dunbar [Tue, 17 Nov 2009 06:37:03 +0000 (06:37 +0000)]
Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

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

15 years agoAdd newline at the end of the file.
Ted Kremenek [Tue, 17 Nov 2009 06:34:24 +0000 (06:34 +0000)]
Add newline at the end of the file.

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

15 years agoSilence some warnings produced by Clang, and add a missing header
Douglas Gregor [Tue, 17 Nov 2009 06:14:37 +0000 (06:14 +0000)]
Silence some warnings produced by Clang, and add a missing header

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

15 years agoImplement template instantiation for using directives, which is dead simple.
Douglas Gregor [Tue, 17 Nov 2009 06:07:40 +0000 (06:07 +0000)]
Implement template instantiation for using directives, which is dead simple.

Also, make the "don't know how to instantiate a particular kind of
declaration" diagnostic nicer, so we don't have to trap Clang in a
debugger to figure out what went wrong.

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

15 years agoAdd initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocat...
Daniel Dunbar [Tue, 17 Nov 2009 06:02:29 +0000 (06:02 +0000)]
Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
 - Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.

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

15 years agoInstead of hanging a using declaration's target decls directly off the using
John McCall [Tue, 17 Nov 2009 05:59:44 +0000 (05:59 +0000)]
Instead of hanging a using declaration's target decls directly off the using
decl, create shadow declarations and put them in scope like normal.
Work in progress.

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

15 years agoSimplify PreprocessorOptions, it doesn't need abstracted field access.
Daniel Dunbar [Tue, 17 Nov 2009 05:52:41 +0000 (05:52 +0000)]
Simplify PreprocessorOptions, it doesn't need abstracted field access.

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

15 years agoHave clang_getCursorSource() return NULL when the source location is invalid or refer...
Ted Kremenek [Tue, 17 Nov 2009 05:31:58 +0000 (05:31 +0000)]
Have clang_getCursorSource() return NULL when the source location is invalid or refers to a built-in buffer.  Implements <rdar://problem/7296243>.

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

15 years agoAdd missing #include found by Clang
Douglas Gregor [Tue, 17 Nov 2009 05:21:59 +0000 (05:21 +0000)]
Add missing #include found by Clang

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

15 years agoRequire the object type of a member access expression ("." or "->") to
Douglas Gregor [Tue, 17 Nov 2009 05:17:33 +0000 (05:17 +0000)]
Require the object type of a member access expression ("." or "->") to
be complete.

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

15 years agoReorder options alphabetically.
Daniel Dunbar [Tue, 17 Nov 2009 05:05:17 +0000 (05:05 +0000)]
Reorder options alphabetically.

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

15 years agoMove InitializeAnalyzerOptions for consistency.
Daniel Dunbar [Tue, 17 Nov 2009 05:05:08 +0000 (05:05 +0000)]
Move InitializeAnalyzerOptions for consistency.

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

15 years agoRemove unused NoPreprocess variable.
Daniel Dunbar [Tue, 17 Nov 2009 05:04:57 +0000 (05:04 +0000)]
Remove unused NoPreprocess variable.

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

15 years agoRemove unused program action.
Daniel Dunbar [Tue, 17 Nov 2009 05:04:48 +0000 (05:04 +0000)]
Remove unused program action.

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

15 years agoRename CompilerInvocation::DiagOpts -> DiagnosticOpts for consistency.
Daniel Dunbar [Tue, 17 Nov 2009 05:04:39 +0000 (05:04 +0000)]
Rename CompilerInvocation::DiagOpts -> DiagnosticOpts for consistency.

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

15 years agoAdd missing defaults to AnalyzerOptions.
Daniel Dunbar [Tue, 17 Nov 2009 05:04:28 +0000 (05:04 +0000)]
Add missing defaults to AnalyzerOptions.

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

15 years agoRemove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.
Daniel Dunbar [Tue, 17 Nov 2009 05:04:15 +0000 (05:04 +0000)]
Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.

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

15 years agoUnify the way destructor epilogues are generated for synthesized and regular destruct...
Anders Carlsson [Tue, 17 Nov 2009 04:44:12 +0000 (04:44 +0000)]
Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

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

15 years agoMore const is always good.
Anders Carlsson [Tue, 17 Nov 2009 03:57:07 +0000 (03:57 +0000)]
More const is always good.

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

15 years agoAdd a comment.
Zhongxing Xu [Tue, 17 Nov 2009 03:20:08 +0000 (03:20 +0000)]
Add a comment.

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

15 years agoFix typo. Thanks Ted.
Mike Stump [Tue, 17 Nov 2009 03:01:03 +0000 (03:01 +0000)]
Fix typo.  Thanks Ted.

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

15 years agoAdd typeinfo support for T* and const T* for all builtin types T.
Mike Stump [Tue, 17 Nov 2009 02:57:13 +0000 (02:57 +0000)]
Add typeinfo support for T* and const T* for all builtin types T.

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

15 years agoAdd test to verify that the analyzer plist output is what we expect.
Ted Kremenek [Tue, 17 Nov 2009 02:31:39 +0000 (02:31 +0000)]
Add test to verify that the analyzer plist output is what we expect.

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

15 years agoAdd typeid for the builtin types. WIP.
Mike Stump [Tue, 17 Nov 2009 02:16:21 +0000 (02:16 +0000)]
Add typeid for the builtin types.  WIP.

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

15 years agoCarry lookup configuration throughout lookup on the LookupResult. Give
John McCall [Tue, 17 Nov 2009 02:14:36 +0000 (02:14 +0000)]
Carry lookup configuration throughout lookup on the LookupResult.  Give
LookupResult RAII powers to diagnose ambiguity in the results.  Other diagnostics
(e.g. access control and deprecation) will be moved to automatically trigger
during lookup as part of this same mechanism.

This abstraction makes it much easier to encapsulate aliasing declarations
(e.g. using declarations) inside the lookup system:  eventually, lookup will
just produce the aliases in the LookupResult, and the standard access methods
will naturally strip the aliases off.

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

15 years agoFix tests after enabling -split-phi-edges.
Jakob Stoklund Olesen [Tue, 17 Nov 2009 01:47:01 +0000 (01:47 +0000)]
Fix tests after enabling -split-phi-edges.

object-size.c aws simply too fragile.

constructor-default-arg.cpp triggers an issue when LiveVariables is run before RALocal.

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

15 years agoPR5526: Make sure to set the right cast kinds for the inserted implicit casts.
Eli Friedman [Tue, 17 Nov 2009 01:22:05 +0000 (01:22 +0000)]
PR5526: Make sure to set the right cast kinds for the inserted implicit casts.

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

15 years agoWhen querying type qualifiers on QualType via one of the "non-local"
Douglas Gregor [Tue, 17 Nov 2009 00:55:50 +0000 (00:55 +0000)]
When querying type qualifiers on QualType via one of the "non-local"
interfaces (which are used throughout the front end), combine the
qualifiers on the QualType instance with the qualifiers on the
canonical type to produce the set of qualifiers that, semantically,
apply to that type. This should design away a large category of
"qualifier-hidden-behind-a-typedef" buts like we saw in PR5383.

Performance-wise, this caused a regression of ~0.5% on Cocoa.h, but
it's totally worth it. We may actually be able to get a little more
performance back by using CanQualType more often.

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

15 years agoEnsure we peer through () when handling typeid(*p).
Mike Stump [Tue, 17 Nov 2009 00:45:21 +0000 (00:45 +0000)]
Ensure we peer through () when handling typeid(*p).

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

15 years agoRemove extra space in warn_maynot_respond diagnostic. Fixes <rdar://problem/7364274>.
Ted Kremenek [Tue, 17 Nov 2009 00:35:14 +0000 (00:35 +0000)]
Remove extra space in warn_maynot_respond diagnostic.  Fixes <rdar://problem/7364274>.

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

15 years agoNote why this doesn't yet work.
Mike Stump [Tue, 17 Nov 2009 00:30:31 +0000 (00:30 +0000)]
Note why this doesn't yet work.

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

15 years agoTrim spacing.
Mike Stump [Tue, 17 Nov 2009 00:14:04 +0000 (00:14 +0000)]
Trim spacing.

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

15 years agoSince we always have 2 edges, we don't need to reserve 3 slot for the
Mike Stump [Tue, 17 Nov 2009 00:10:05 +0000 (00:10 +0000)]
Since we always have 2 edges, we don't need to reserve 3 slot for the
PHI node.

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

15 years agoMinor CFG refinements for typeid and dynamic_cast.
Mike Stump [Tue, 17 Nov 2009 00:08:50 +0000 (00:08 +0000)]
Minor CFG refinements for typeid and dynamic_cast.

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

15 years agoFix up EmitMemberInitializer to handle many more cases.
Eli Friedman [Mon, 16 Nov 2009 23:53:01 +0000 (23:53 +0000)]
Fix up EmitMemberInitializer to handle many more cases.

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

15 years agoTestcase for dynamic_cast.
Mike Stump [Mon, 16 Nov 2009 23:36:30 +0000 (23:36 +0000)]
Testcase for dynamic_cast.

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

15 years agoReorganize EmitMemberInitializer to put anonymous unions on the common codepath.
Eli Friedman [Mon, 16 Nov 2009 23:34:11 +0000 (23:34 +0000)]
Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.

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

15 years agoSimplify the AST a bit by skipping creating member initializers for members
Eli Friedman [Mon, 16 Nov 2009 23:07:59 +0000 (23:07 +0000)]
Simplify the AST a bit by skipping creating member initializers for members
with a trivial constructor.

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

15 years agoMake member initializers for union members work correctly.
Eli Friedman [Mon, 16 Nov 2009 22:58:01 +0000 (22:58 +0000)]
Make member initializers for union members work correctly.

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

15 years agoImplement dynamic_cast<void*>(E).
Mike Stump [Mon, 16 Nov 2009 22:52:20 +0000 (22:52 +0000)]
Implement dynamic_cast<void*>(E).

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

15 years agoUpdate test, I don't know why this changed but seems innocuous.
Daniel Dunbar [Mon, 16 Nov 2009 22:38:57 +0000 (22:38 +0000)]
Update test, I don't know why this changed but seems innocuous.

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

15 years agoTrim includes.
Daniel Dunbar [Mon, 16 Nov 2009 22:38:48 +0000 (22:38 +0000)]
Trim includes.

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

15 years agoStore more information in HeaderSearchOptions so that its initialization is not
Daniel Dunbar [Mon, 16 Nov 2009 22:38:40 +0000 (22:38 +0000)]
Store more information in HeaderSearchOptions so that its initialization is not
language dependent.

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