Daniel Dunbar
9ae186f7ca
Unbreak build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127942 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 02:06:21 +00:00
Ken Dyck
199c1891e9
Use CharUnits's new increment operator. No change in functionality intended.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127938 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:28:06 +00:00
Ken Dyck
f899af6628
Add pre- and post-increment/decrement operators to CharUnits.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127937 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:25:59 +00:00
Daniel Dunbar
47226350c4
Preprocessor: Don't define __STDC__ in -traditional-cpp mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127933 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:04:12 +00:00
Ted Kremenek
6ad6e95b45
Recovery memory from TypeLocBuilders during crashes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127932 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:00:38 +00:00
Ted Kremenek
4d96d9f0e7
Recover memory from RecordLayoutBuilders during crashes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127931 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:00:36 +00:00
Ted Kremenek
af13d5b25b
Rename class 'CFGReachabilityAnalysis' to 'CFGReverseBlockReachabilityAnalysis'.
...
This rename serves two purposes:
- It reflects the actual functionality of this analysis.
- We will have more than one reachability analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127930 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 01:00:33 +00:00
Ken Dyck
4f318c080b
Replace literal '8's with CharWidth in AppendBitField. No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127927 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19 00:57:28 +00:00
Ted Kremenek
d2427ddf00
Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism for a client to enable/disable CrashRecovery within libclang function calls.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127920 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 23:05:39 +00:00
Ted Kremenek
6628a614c5
Run all functional logic of clang_annotateTokens() within a CrashRecoveryContext. Fixes <rdar://problem/9121698>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127919 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 22:51:30 +00:00
Peter Collingbourne
207f4d8543
Add support for language-specific address spaces. On top of that,
...
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 22:38:29 +00:00
Ted Kremenek
1761ce57d6
Remove '-Xclang' and '-mllvm' entries from Clang man page. The later is only available in debug builds and the former is not supposed to be used by end-users.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127914 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 22:11:40 +00:00
Daniel Dunbar
d98750f065
Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
...
- We don't really support the majority of the horrible -traditional-cpp
behavior, but it is unlikely that we ever will either. This allows us to
start trying to use clang as a /usr/bin/cpp replacement and see what pieces
of -traditional-cpp mode people actually care about.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127911 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 21:23:40 +00:00
Daniel Dunbar
2ed42287b9
Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
...
comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127910 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 21:23:38 +00:00
Daniel Dunbar
5ce872fdcd
Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
...
don't support the ABI yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127903 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 20:14:03 +00:00
Daniel Dunbar
ac0659ae41
Driver: Give SelectTool access to the action inputs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127902 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 20:14:00 +00:00
Daniel Dunbar
4702309fb6
Driver/Darwin: Change fallback to use llvm-gcc search paths instead of GCC.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127897 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 19:25:15 +00:00
Daniel Dunbar
79be940271
Driver/Darwin: Kill the DarwinGCC toolchain.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127896 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 19:25:10 +00:00
Anders Carlsson
340415c0c7
Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127894 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 19:23:38 +00:00
Anders Carlsson
7dbafb3ade
Add FileManager::getNoncachedStatValue, which will resolve relative paths against the working directory specified in the file system options.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127893 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 19:23:19 +00:00
Anders Carlsson
0d8d7e6067
Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127890 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 18:22:40 +00:00
Douglas Gregor
d6a49bb69f
Add an opt-in -Wheader-hygiene, which current diagnoses the use of
...
global using directives in C++ headers, from Elliot Glaysher!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127881 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 16:10:52 +00:00
Rafael Espindola
7693b10218
On !Darwin, do use the integrated as with -static.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 15:50:12 +00:00
Abramo Bagnara
b0a2fcc1e9
Defined friend functions are *implicitly* inlined, unless the inline specifier occurs explicitly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127877 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 15:21:59 +00:00
Abramo Bagnara
7f0a915eb5
Fixed inconsistency when adding TemplateParameterListsInfo.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127876 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 15:16:37 +00:00
NAKAMURA Takumi
a9d129329b
test/CodeGenCXX/apple-kext-guard-variable.cpp: May I appease non-darwin hosts?
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 04:46:08 +00:00
John McCall
87494017b8
Improve the documentation for some of the analyzer attributes I added
...
a while back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127866 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:51:49 +00:00
Ted Kremenek
934a57194c
Construct 'Sema' object on the stack, so that crash recovery can recovery it's associated resources without walking over dead stack space.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127864 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:44:21 +00:00
NAKAMURA Takumi
da0f45de17
www/hacking.html: Add blurb of LLVM_LIT_TOOLS_DIR.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127863 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:21:44 +00:00
NAKAMURA Takumi
6975d07a6c
www/hacking.html: Cosmetic change, to detabify, eliminate whitespace, and add proper slashes to URL.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127862 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:21:38 +00:00
NAKAMURA Takumi
b8bcce37b7
test/Driver/sysroot-flags.c: Tweak for Mingw MSYS bash.
...
MSYS substitutes path (that begins with "/") to de-mounted Windows path, even if it were nonexistent.
"/foo/bar" might be substituted to "C:/msysgit/foo/bar".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127861 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:21:33 +00:00
NAKAMURA Takumi
70dbdf7469
test/Driver/darwin-cc.c: FileCheck-ize and tweak for Mingw MSYS bash.
...
MSYS substitutes path (that begins with "/") to de-mounted Windows path.
"/tmp" might be substituted as "C:/DOCUME~1/chapuni/LOCALS~1/Temp".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127860 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 03:21:26 +00:00
John McCall
32096695c7
The Darwin kernel does not provide useful guard variable support.
...
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127854 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 02:56:14 +00:00
Ted Kremenek
b547eebdff
Use CrashRecoveryContextCleanup objects to recover an ASTUnit if we crash in ASTUnit::LoadFromCommandLine() and ASTUnit::LoadFromCompilerInvocation().
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127851 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 02:06:56 +00:00
Ted Kremenek
965fe844ce
Use CrashRecoveryContextCleanup objects to release resources associated with Sema during a crash while parsing.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127850 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 02:06:53 +00:00
Ken Dyck
7d2f9d54bd
Convert alignment values to CharUnits. No change in functionality intended.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 01:26:17 +00:00
Ken Dyck
15c152e4f0
Convert getSizeInBytes() to getSizeInChars(), which returns its result in
...
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127846 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 01:12:13 +00:00
Ken Dyck
4a5c87ec3b
Convert variables to CharUnits in ConvertStructToPacked(). No change in
...
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127844 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18 00:55:06 +00:00
Daniel Dunbar
d47ea69370
Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
...
disable Obj-C exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 23:28:31 +00:00
Oscar Fuentes
617508fb9e
Fix some issues with include directories: remove a duplicate and put
...
Clang binary and source directories first (on that order).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127822 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 19:03:04 +00:00
Daniel Dunbar
0133917074
Driver/Darwin: These are command line options, not target features.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 18:29:04 +00:00
Daniel Dunbar
7f6f8c8ab2
Driver/Darwin: Suppress spurious warning about -force_cpusubtype_ALL.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 17:37:29 +00:00
Daniel Dunbar
fa41d69750
Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127815 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 17:10:06 +00:00
Richard Smith
a085da8624
Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does.
...
Also fix an issue where type source information for the resulting type was being lost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127811 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 16:11:59 +00:00
David Chisnall
827bbcc8a9
Remove code that was intentionally generating bad code on the GNU runtime for no reason (failing to emit .cxx_constructor / .cxx_destructor methods).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127806 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 14:19:08 +00:00
Ted Kremenek
53b24ebc37
Fix test to test the right thing.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127803 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 05:34:58 +00:00
Ted Kremenek
c5e43c19dd
Don't construct two CFGs just to run -Wuninitialized. While this causes new warnings to be flagged under -Wconditional-uninitialized, this is something we
...
can improve over time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127802 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 05:29:57 +00:00
Ted Kremenek
c9dcb45795
Make test more portable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 04:16:45 +00:00
Ted Kremenek
f3f9293862
Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 04:10:25 +00:00
Ted Kremenek
928c415d5d
Teach VariadicMethodTypeChecker that CF references are valid arguments to variadic Objective-C methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 04:01:35 +00:00