Граф коммитов

18812 Коммитов

Автор SHA1 Сообщение Дата
Chandler Carruth aec7caa3c4 Correctly treat 64 bit integers specified via the mode attribute as the 'long'
type when that type is 64 bits wide, and the 'long long' type when 'long' is
only 32 bits wide. This fixes PR6108.

Also adds a bunch of test cases to ensure proper conversion between equally
sized standard types and mode-specified types on both 32 and 64 bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:39:24 +00:00
Anders Carlsson d0c4792ca6 If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:15:16 +00:00
John McCall a113e7263c Allow ADL to find functions imported by using decls. Leave wordy comment
about interaction between ADL and default arguments.  Shrug shoulders, commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:04:06 +00:00
Chandler Carruth dbdad6d933 Remove a few more references to index-test; this was killed in r94210.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:36:44 +00:00
Anders Carlsson e70d391ed5 Fix another debug info crash with virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:26:39 +00:00
Anders Carlsson 4433f1cf8a Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94519 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:19:50 +00:00
Anders Carlsson d6f9a0d14b Factor creating the DISubprogram for a member function out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:49:33 +00:00
Anders Carlsson bea9b2375a Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:40:11 +00:00
Anders Carlsson 071c81065a Make sure to always mark a global variable as not being constant if it has a C++ initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:02:23 +00:00
Daniel Dunbar 314cba0272 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:56:40 +00:00
Mike Stump d99a4d2407 Be sure to track the non-virtual part of the vcall offset in complex
multiple inheritance cases.  WIP.

This fixes 20% of the outstanding problems found by the randomized
tester.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:42:22 +00:00
John McCall 6e26689f5d Preserve access bits through overload resolution much better. Some
general refactoring in operator resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:27:55 +00:00
Douglas Gregor e69517ce61 Introduce clang_getInstantiationLocationOffset(), which decomposes a
source location in file + offset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94497 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:07:15 +00:00
Daniel Dunbar 816bc31ed4 Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:45:19 +00:00
Daniel Dunbar 21ae3196c9 Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:44:04 +00:00
John McCall 86820f58e0 Pass access specifiers around in overload resolution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:37:31 +00:00
Fariborz Jahanian a5d5fbcb44 Fix a regression caused by my rewriting of cast of ivar
access (was radar 7575882).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:29:22 +00:00
Mike Stump cf0b9cc2f7 Fixup a missing vcall entry. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:05:04 +00:00
Devang Patel a245c5b36a First cut at emitting inheritance info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:32:18 +00:00
Devang Patel c002464ae5 Emit debug info for virtual functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:17:15 +00:00
John McCall 841d5e607f Fixit to remove 'volatile' in file-scope 'asm volatile'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:12:50 +00:00
Daniel Dunbar 82b51cce8c Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:35:08 +00:00
Ted Kremenek a297de20bd Pull functions that translate from CXSourceLocation to SourceLocation (and back) to a separate header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:34:44 +00:00
John McCall 7a6ae743b2 Warn on top-level 'asm volatile' (instead of misparsing it).
"Fixes" rdar://problem/7574870



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:27:48 +00:00
Fariborz Jahanian 616c173809 global variable that binds reference to a non-lvalue reproted
as NYI now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:40:39 +00:00
Ted Kremenek 2cd10b071e Fix include guard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:09:34 +00:00
Fariborz Jahanian 5bfc536440 Fixes a rewriting bug of access ivar of a variable cast
to subclass. (Fixes radar 7575882).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 20:50:02 +00:00
Fariborz Jahanian f7c00eda7f Fix a code gen. bug involving compiling global references.
(fixes radar 7574896).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:30:26 +00:00
Douglas Gregor 3512107be5 Add test case for ? : crasher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:48:13 +00:00
Ted Kremenek 6b67630d5d Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:10:22 +00:00
Eli Friedman a1635d9b46 Code simplification; this should have no visible effects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94427 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:04:54 +00:00
Douglas Gregor 60cbfacd94 Loosen preconditions for clang_getCursorSpelling(), returning an empty
string when given a cursor that does not have a name. Also, don't give
silly names for statements and non-reference expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:56:17 +00:00
Douglas Gregor fd64377225 Expect the impossible
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:45:46 +00:00
Douglas Gregor b988f9cde9 Move the type specifier location for elaborated-type-specifiers from
the tag kind (union, struct, class, enum) over to the name of the tag,
if there is a name, since most clients want to point at the name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:33:23 +00:00
Douglas Gregor 263b47b627 Visit the condition variables of while and for loops; also, visit the
condition even when we've visited the condition variable, so that
we'll see implicit conversions there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94423 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:12:32 +00:00
Benjamin Kramer 0db3d725ec Update C++ include paths for Exherbo, by Ingmar Vanhassel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 12:20:15 +00:00
Daniel Dunbar 061bae930b cindex/Python: Move translation unit load functions to Index, there isn't a good reason to have separate static methods for this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 09:16:55 +00:00
Daniel Dunbar db59a7700e cindex/Python: Support file objects as unsaved_files, albeit inefficiently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 09:16:41 +00:00
Ted Kremenek 326be568e2 Add missing header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 05:19:37 +00:00
Ted Kremenek 83fc147dc2 Add missing file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:48:38 +00:00
Ted Kremenek 1309f9a3b2 Split libAnalysis into two libraries: libAnalysis and libChecker.
(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:41:41 +00:00
Chris Lattner 3db9eb1fbe merge another one in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:38:26 +00:00
Chris Lattner 9712e0be99 consolidate two testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:37:52 +00:00
Chris Lattner 165714e026 fix rdar://7556129 a crash in blocks debug info codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94402 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:34:56 +00:00
Chris Lattner 14b1a363fb simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:29:35 +00:00
Daniel Dunbar 90859ae3b6 cindex/Python: Add Cursor test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:21 +00:00
Daniel Dunbar 5b534f6794 cindex/Python: Implement support for unsaved/remapped files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:11 +00:00
Daniel Dunbar 3bd54cc562 ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:02 +00:00
Daniel Dunbar 1f8d7f94c7 cindex/Python: Fix/simplify Index.parse() passing command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:43:31 +00:00
Daniel Dunbar fd9f23464b Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:43:14 +00:00