]>
granicus.if.org Git - clang/log
Daniel Dunbar [Tue, 22 Mar 2011 16:48:17 +0000 (16:48 +0000)]
Frontend: Add a more explicit -backend-option flag for passing backend command
line options, instead of leveraging the blanket -mllvm option.
- This allows using the frontend itself without requiring the backend have
those options available (i.e., if the target wasn't built).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 22 Mar 2011 09:46:54 +0000 (09:46 +0000)]
Don't clear OverloadCandidateSets on destruction, it has no effect anymore.
And clearing a SmallPtrSet can be an expensive operation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128081
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 22 Mar 2011 07:16:37 +0000 (07:16 +0000)]
Apply Jonathan Sauer's proposed solution to PR9519. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128075
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 22 Mar 2011 07:05:39 +0000 (07:05 +0000)]
The emission of an Objective-C++'s class .cxx_destruct method should be
conditioned on whether it has any destructible ivars, not on whether
it has any non-trivial class-object initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128074
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 22 Mar 2011 06:58:49 +0000 (06:58 +0000)]
Fix a test case and teach ClearLinkageCache() to clear the linkage of
a function template decl's pattern, which was suddenly exposed by my
last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128073
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 22 Mar 2011 06:34:45 +0000 (06:34 +0000)]
File-scope static functions need to be mangled with 'L' so that
they don't collide with file-scope extern functions from the same
translation unit. This is basically a matter of applying the same
logic to FunctionDecls as we were previously applying to VarDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Tue, 22 Mar 2011 01:21:15 +0000 (01:21 +0000)]
Convert Offset variable in GetAddressOfDirectBaseInCompleteClass() to
CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Mar 2011 01:15:24 +0000 (01:15 +0000)]
Rework crash recovery cleanup in ASTUnit and CIndex to recover more memory during a Sema crash (we have just a handful of leaks left)
and to use the simplified cleanup registration API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Mar 2011 01:15:21 +0000 (01:15 +0000)]
Remove crash recovery cleanups from TypeLocBuilder. They were a bit error prone, only hit in rare cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Mar 2011 01:15:19 +0000 (01:15 +0000)]
Simplify crash recovery cleanup registration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Mar 2011 01:15:17 +0000 (01:15 +0000)]
Migrate 'PrettySTackTraceParserEntry' object out of Parser, and have it constructed within ParseAST. This avoids double crashes
during crash recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128056
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Tue, 22 Mar 2011 00:53:26 +0000 (00:53 +0000)]
Change return value of ComputeNonVirtualBaseClassOffset() to CharUnits. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Tue, 22 Mar 2011 00:24:31 +0000 (00:24 +0000)]
Eliminate some literal '8's in FillInNullDataMemberPointers() by switching
to CharUnits. No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 22 Mar 2011 00:19:31 +0000 (00:19 +0000)]
Output to tempfile
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 21 Mar 2011 21:55:25 +0000 (21:55 +0000)]
Another cortex-m0 patch from James Orr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 21 Mar 2011 20:40:05 +0000 (20:40 +0000)]
Add clang support for cortex-m0 cpus. Patch by James Orr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Mar 2011 20:12:21 +0000 (20:12 +0000)]
scan-build: only display analyzer intra-file progress when in "Verbose" mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 21 Mar 2011 19:37:38 +0000 (19:37 +0000)]
Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don't
really make any sense in this environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Mar 2011 19:08:42 +0000 (19:08 +0000)]
Fix an objc++ diagnostic initializing objc pointers.
// rdar://
9139947
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Mar 2011 18:40:17 +0000 (18:40 +0000)]
Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Mar 2011 18:40:10 +0000 (18:40 +0000)]
Relax assertion to fail during crash recovery cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 21 Mar 2011 18:40:07 +0000 (18:40 +0000)]
Use CrashRecoveryContextCleanup objects to reclaim resources from CompilerInstance objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Mar 2011 16:25:11 +0000 (16:25 +0000)]
and now there are 3!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 21 Mar 2011 14:01:40 +0000 (14:01 +0000)]
Introduce FindTargetProgramPath to check for a target-specific helper
program and fallback to plain version otherwise. Use this for the NetBSD
target to make it try e.g. i486--netbsdelf-as and -ld for target
i486--netbsdelf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 21 Mar 2011 13:59:26 +0000 (13:59 +0000)]
Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 21 Mar 2011 13:51:29 +0000 (13:51 +0000)]
Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 21 Mar 2011 05:02:03 +0000 (05:02 +0000)]
Pass in the TargetMachine parameter to the inst printer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 21 Mar 2011 01:45:18 +0000 (01:45 +0000)]
Code modification hints have been known as fix-it hints for almost
a year now. Update the internals manual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127983
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sun, 20 Mar 2011 21:35:39 +0000 (21:35 +0000)]
Fix Objective-C++ exceptions (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 20 Mar 2011 20:52:32 +0000 (20:52 +0000)]
__cxa_atexit does not throw.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 20 Mar 2011 18:17:52 +0000 (18:17 +0000)]
In clang_parseTranslationUnit_Impl,p ut the source file after command_line_args otherwise
if '-x' flag is present it will be unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 Mar 2011 08:06:45 +0000 (08:06 +0000)]
Only objects are declared const by a constexpr specifier, per C++0x [dcl.constexpr]p9
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sat, 19 Mar 2011 23:05:18 +0000 (23:05 +0000)]
Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. MSVC doesn't do any validation on exception specifications.
This remove 1 error when parsing MSVC stl lib with clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 Mar 2011 13:04:25 +0000 (13:04 +0000)]
Initialize FakeAddressSpaceMap flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Yartsev [Sat, 19 Mar 2011 07:53:43 +0000 (07:53 +0000)]
makes vec_step operator work when AltiVec support is enabled
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Mar 2011 02:06:21 +0000 (02:06 +0000)]
Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Sat, 19 Mar 2011 01:28:06 +0000 (01:28 +0000)]
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
Ken Dyck [Sat, 19 Mar 2011 01:25:59 +0000 (01:25 +0000)]
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
Daniel Dunbar [Sat, 19 Mar 2011 01:04:12 +0000 (01:04 +0000)]
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
Ted Kremenek [Sat, 19 Mar 2011 01:00:38 +0000 (01:00 +0000)]
Recovery memory from TypeLocBuilders during crashes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Mar 2011 01:00:36 +0000 (01:00 +0000)]
Recover memory from RecordLayoutBuilders during crashes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Mar 2011 01:00:33 +0000 (01:00 +0000)]
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
Ken Dyck [Sat, 19 Mar 2011 00:57:28 +0000 (00:57 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 23:05:39 +0000 (23:05 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 22:51:30 +0000 (22:51 +0000)]
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
Peter Collingbourne [Fri, 18 Mar 2011 22:38:29 +0000 (22:38 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 22:11:40 +0000 (22:11 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 21:23:40 +0000 (21:23 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 21:23:38 +0000 (21:23 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 20:14:03 +0000 (20:14 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 20:14:00 +0000 (20:14 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 19:25:15 +0000 (19:25 +0000)]
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
Daniel Dunbar [Fri, 18 Mar 2011 19:25:10 +0000 (19:25 +0000)]
Driver/Darwin: Kill the DarwinGCC toolchain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 18 Mar 2011 19:23:38 +0000 (19:23 +0000)]
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
Anders Carlsson [Fri, 18 Mar 2011 19:23:19 +0000 (19:23 +0000)]
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
Anders Carlsson [Fri, 18 Mar 2011 18:22:40 +0000 (18:22 +0000)]
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
Douglas Gregor [Fri, 18 Mar 2011 16:10:52 +0000 (16:10 +0000)]
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
Rafael Espindola [Fri, 18 Mar 2011 15:50:12 +0000 (15:50 +0000)]
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
Abramo Bagnara [Fri, 18 Mar 2011 15:21:59 +0000 (15:21 +0000)]
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
Abramo Bagnara [Fri, 18 Mar 2011 15:16:37 +0000 (15:16 +0000)]
Fixed inconsistency when adding TemplateParameterListsInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127876
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 18 Mar 2011 04:46:08 +0000 (04:46 +0000)]
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
John McCall [Fri, 18 Mar 2011 03:51:49 +0000 (03:51 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 03:44:21 +0000 (03:44 +0000)]
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
NAKAMURA Takumi [Fri, 18 Mar 2011 03:21:44 +0000 (03:21 +0000)]
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
NAKAMURA Takumi [Fri, 18 Mar 2011 03:21:38 +0000 (03:21 +0000)]
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
NAKAMURA Takumi [Fri, 18 Mar 2011 03:21:33 +0000 (03:21 +0000)]
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
NAKAMURA Takumi [Fri, 18 Mar 2011 03:21:26 +0000 (03:21 +0000)]
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
John McCall [Fri, 18 Mar 2011 02:56:14 +0000 (02:56 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 02:06:56 +0000 (02:06 +0000)]
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
Ted Kremenek [Fri, 18 Mar 2011 02:06:53 +0000 (02:06 +0000)]
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
Ken Dyck [Fri, 18 Mar 2011 01:26:17 +0000 (01:26 +0000)]
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
Ken Dyck [Fri, 18 Mar 2011 01:12:13 +0000 (01:12 +0000)]
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
Ken Dyck [Fri, 18 Mar 2011 00:55:06 +0000 (00:55 +0000)]
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
Daniel Dunbar [Thu, 17 Mar 2011 23:28:31 +0000 (23:28 +0000)]
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
Oscar Fuentes [Thu, 17 Mar 2011 19:03:04 +0000 (19:03 +0000)]
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
Daniel Dunbar [Thu, 17 Mar 2011 18:29:04 +0000 (18:29 +0000)]
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
Daniel Dunbar [Thu, 17 Mar 2011 17:37:29 +0000 (17:37 +0000)]
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
Daniel Dunbar [Thu, 17 Mar 2011 17:10:06 +0000 (17:10 +0000)]
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
Richard Smith [Thu, 17 Mar 2011 16:11:59 +0000 (16:11 +0000)]
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
David Chisnall [Thu, 17 Mar 2011 14:19:08 +0000 (14:19 +0000)]
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
Ted Kremenek [Thu, 17 Mar 2011 05:34:58 +0000 (05:34 +0000)]
Fix test to test the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Mar 2011 05:29:57 +0000 (05:29 +0000)]
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
Ted Kremenek [Thu, 17 Mar 2011 04:16:45 +0000 (04:16 +0000)]
Make test more portable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Mar 2011 04:10:25 +0000 (04:10 +0000)]
Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Mar 2011 04:01:35 +0000 (04:01 +0000)]
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
Ted Kremenek [Thu, 17 Mar 2011 03:51:51 +0000 (03:51 +0000)]
Tweak RegionStore's handling of lazy compound values to use the 'Default' versus 'Direct' binding key, thus allowing specific elements of an array/struct to be overwritten without
invalidating the entire binding. Fixes PR 9455.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Mar 2011 03:06:11 +0000 (03:06 +0000)]
Extend -Wuninitialized to support vector types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Mar 2011 03:06:07 +0000 (03:06 +0000)]
Rename -Wuninitialized-maybe to -Wconditional-uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 17 Mar 2011 01:33:18 +0000 (01:33 +0000)]
Convert NextOffsetInBytes to CharUnits and rename to NextOffsetInChars. No
change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 17 Mar 2011 00:46:34 +0000 (00:46 +0000)]
Politely inform GCC that we will never fall off the end of that switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 17 Mar 2011 00:07:34 +0000 (00:07 +0000)]
Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
not being consistent at all with other parts of the GCC implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 Mar 2011 23:23:30 +0000 (23:23 +0000)]
When libclang visits a translation unit via clang_visitChildren(),
walk the preprocessing record *before* walking the declarations, so
they we pretend that we actually respect the phases of translation.
We still walk the preprocessing record after the declarations when
performing token annotation or finding the cursor at a location, since
those routines depend on those semantics.
Fixes <rdar://problem/
9137195 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Wed, 16 Mar 2011 22:45:02 +0000 (22:45 +0000)]
Use C as fallback type if in C preprocessor mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 16 Mar 2011 22:34:09 +0000 (22:34 +0000)]
PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Mar 2011 21:10:42 +0000 (21:10 +0000)]
Compress argument processing in ccc-analyzer. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Wed, 16 Mar 2011 20:16:18 +0000 (20:16 +0000)]
Use ElaboratedType also for C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Wed, 16 Mar 2011 20:15:43 +0000 (20:15 +0000)]
Refactor program name logic. Extend it to infer the target triple from
the program name, if it includes it as proper prefix. This makes calling
clang with -ccc-host-triple x86_64-linux the same as calling it with the
name x86_64-linux-clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127753
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 Mar 2011 19:27:09 +0000 (19:27 +0000)]
Detect attempts to provide a specialization of a function within a
dependent scope and produce an error (rather than crashing). Fixes PR8979.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 Mar 2011 19:17:25 +0000 (19:17 +0000)]
Having FileManager::getFile always open the file, brought much consternation and leaking of file descriptors.
Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it
false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters.
Fixes rdar://
9139899 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 16 Mar 2011 19:16:25 +0000 (19:16 +0000)]
Clean up our handling of template-ids that resolve down to a single
overload, so that we actually do the resolution for full expressions
and emit more consistent, useful diagnostics. Also fixes an IRGen
crasher, where Sema wouldn't diagnose a resolvable bound member
function template-id used in a full-expression (<rdar://problem/
9108698 >).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127747
91177308 -0d34-0410-b5e6-
96231b3b80d8