Douglas Gregor
2e4c7a5865
When code completion produces an overload set as its results (e.g.,
...
while we're completing in the middle of a function call), also produce
"ordinary" name results that show what can be typed at that point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 20:19:47 +00:00
Douglas Gregor
fe0bdba446
Do not produce semicolons at the end of code-completion results
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 20:11:37 +00:00
Douglas Gregor
2f880e47ca
Only prove macros as code-completion results when we're in a case
...
statement or for ordinary names. This means that we won't show macros
when completing, e.g., member expressions such as "p->".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100555 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 20:02:15 +00:00
Ted Kremenek
2aefcb2e8b
Fix ccc-analyzer's handling of quoted arguments in the build command. Fixes PR 6791.[B
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100551 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 19:41:24 +00:00
Douglas Gregor
22f569918d
When sending a message to "id", apply some heuristics to try to narrow
...
down the set of code-completion results based on Objective-C
conventions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100548 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 19:22:33 +00:00
Chris Lattner
914803f5d5
add a testcase that the integrated assembler rejects, this verifies
...
that the integrated assembler is working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 18:46:25 +00:00
Chris Lattner
6da9eb6616
teach clang to install the inline asm diagnostic handler,
...
allowing backend errors to be mapped through clang's
diagnostics subsystem, including the backend location info.
We now get:
$ clang asm.c -c -o t.o -integrated-as
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
1 diagnostic generated.
With colors, and correct "# diagnostics generated".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100543 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 18:38:50 +00:00
Chris Lattner
cabae68037
reduce indentation, tidy.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:52:14 +00:00
Blaine Garst
69ecbdbe7a
improved wording around ABI
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:46:43 +00:00
Douglas Gregor
719770dcfc
Make code-completion for Objective-C message sends to "id" work in the
...
presence of precompiled headers by forcibly loading all of the
methods we know about from the PCH file before constructing our
code-completion list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:30:22 +00:00
Chris Lattner
52d9ae3220
fit in 80 cols
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:29:22 +00:00
Fariborz Jahanian
a98344869c
Put type restriction on convesion to nonconforming 'id' back in
...
block pointer type comparison.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:23:39 +00:00
Daniel Dunbar
60a53f24b1
Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
...
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:07:49 +00:00
Douglas Gregor
13438f9b9c
Implement support for code completion of an Objective-C message send to
...
"id" or an expression of type "id". In these cases, we produce a list
of all of the (class or instance) methods, respectively, that we know about.
Note that this implementation does not yet work well with precompiled
headers; that's coming soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 16:40:00 +00:00
Douglas Gregor
85372b93d1
Add test for code completion of Objective-C message sends to classes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 15:27:03 +00:00
Douglas Gregor
64538cfd34
Perform code-completion within ParseCastExpression, which handles,
...
e.g., the right-hand side of binary expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 15:09:27 +00:00
Douglas Gregor
7969f936a1
clang-wpa fixes for Diagnostic
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 04:03:12 +00:00
Zhongxing Xu
7f330856b8
Fix PR 6725. It looks like the copy constructor gets elided during inlining.
...
This bug only shows up with GCC 4.4.1 Release-Asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 03:01:56 +00:00
Douglas Gregor
f45d67364e
Unbreak build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 01:25:58 +00:00
Daniel Dunbar
efbf487da8
IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 01:07:44 +00:00
Daniel Dunbar
c7a984af71
Simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 01:07:41 +00:00
Daniel Dunbar
8bea3efe46
Simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 01:07:39 +00:00
Douglas Gregor
28019772db
Make Diagnostic reference-counted, which is simpler than juggling
...
maybe-ownership vs. ownership.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:52:57 +00:00
Ted Kremenek
e9686572f1
Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:45:09 +00:00
Chris Lattner
01ae93fde8
inline in MC assembly parsers. clang -integrated-as now
...
works with inline asm!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:33:20 +00:00
Chris Lattner
a0a270c0f1
Match MemoryBuffer API changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:42:27 +00:00
Ted Kremenek
5fcd52a6c9
Fix possible null dereference by bailing out of CheckObjCPropertyAttributes() early if the Decl* is null.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:39:42 +00:00
Douglas Gregor
caff6ea818
Grrrr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:48 +00:00
Douglas Gregor
f9b14a7af9
Try to de-bork build of WPA
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:24 +00:00
Daniel Dunbar
f0fe5bc0e4
IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
...
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:36:35 +00:00
Douglas Gregor
84139d6ef8
Extend the type printing policy to allow one to turn off the printing
...
of file locations for anonymous tag types (e.g., "enum <anonymous at
t.h:15:6>"), which can get rather long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:25:31 +00:00
Jeffrey Yasskin
e32be1d07c
Print the errors when a clang test fails instead of just listing the
...
failing test files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:20:38 +00:00
Douglas Gregor
3687e9d3a5
Clarify the ownership semantics of the Diagnostic object used by
...
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:10:19 +00:00
Devang Patel
4800ea6ff8
Emit debug info for objc getters and setters.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:09:15 +00:00
Chris Lattner
018b54e5c3
fix PR6780, properly handling the IR {|} escapes in inline asm strings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:44:00 +00:00
Douglas Gregor
8b96253907
Make the ASTUnit constructor private; all ASTUnit clients should be using the static factory functions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:20:14 +00:00
Chris Lattner
5c5db553b5
fix PR6782, an accept invalid. We weren't emitting the diagnostic
...
returned by SetTypeSpecType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100443 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:18:31 +00:00
Douglas Gregor
405634b215
Minor ASTUnit cleanups:
...
- Rename "Diagnostics" and related to "StoredDiagnostics", to better
capture what we're actually storing.
- Move SourceManager and FileManager to the heap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:10:21 +00:00
Daniel Dunbar
2eec0b2e3e
IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:20:44 +00:00
Daniel Dunbar
56229f5889
Add a FIXME and reduce nesting.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:20:33 +00:00
Douglas Gregor
09d9fa1933
Code completion results that refer to macros now get the cursor kind
...
of macro definitions when passed to CIndex. Add test for code
completion of macros via CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:10:30 +00:00
Zhongxing Xu
7b73b92870
Always assume block-level expressions in the caller are alive when analyzing
...
the callee.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 13:16:29 +00:00
Zhongxing Xu
b3e485c835
Since now we process regions in clusters when removing dead bindings, this
...
code can be removed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 13:00:12 +00:00
Mon P Wang
3ecd785aff
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 03:10:52 +00:00
Rafael Espindola
35d646133b
Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation.
...
Fixes PR6748
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 04:26:42 +00:00
Eric Christopher
eea12d17ec
Add option and macro definition for AES instructions. Now produces real
...
assembly for testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 23:50:19 +00:00
Fariborz Jahanian
05511fa634
Improve diagnosing when a method type does not start with '-'|'+'
...
when parsing. Fixes radar 7822196.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 23:15:40 +00:00
Daniel Dunbar
61ac1d2749
IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:40 +00:00
Daniel Dunbar
c7cbed069e
Avoid unneeded calls to opt/llvm-dis.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:38 +00:00
Daniel Dunbar
fae7bf2690
Merge several tests into switch.c.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:35 +00:00