Sean Hunt [Sun, 29 Aug 2010 21:26:48 +0000 (21:26 +0000)]
Implement C++0x user-defined string literals.
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.
Douglas Gregor [Sun, 29 Aug 2010 19:27:27 +0000 (19:27 +0000)]
Improve code completion for initializer lists in constructors. Instead
of prioritizing just by initialization order, we bump the priority of
just the *next* initializer in the list, and leave everything else at
the normal priority. That way, if one intentionally skips the
initialization of a base or member (to get default initialization),
we'll still get ordered completion for the rest.
Bob Wilson [Sun, 29 Aug 2010 05:14:28 +0000 (05:14 +0000)]
Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/sub
with zext/sext operations, instead of to llvm intrinsics. (We can also
get rid of the clang builtins and handle these entirely in the arm_neon.h
header if there is a way to express vector sext/zext in C.)
John McCall [Sat, 28 Aug 2010 22:14:41 +0000 (22:14 +0000)]
When perform exact-qualifier-match template argument deduction,
properly account for the possibility that certain opaque types
might be more qualified than they appear. Fixes PR7708.
Gabor Greif [Sat, 28 Aug 2010 12:12:45 +0000 (12:12 +0000)]
add another test for PR8007
this is still failing, need to come up with a fix
(but we are in good company as the first gcc version
pass this test will be v4.6)
Fix the memory leak of FloatingLiteral/IntegerLiteral.
For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.
John McCall [Sat, 28 Aug 2010 07:56:00 +0000 (07:56 +0000)]
When checking access control for an instance member access on
an object of type I, if the current access target is protected
when named in a class N, consider the friends of the classes P
where I <= P <= N and where a notional member of N would be
non-forbidden in P.
Ted Kremenek [Sat, 28 Aug 2010 00:19:02 +0000 (00:19 +0000)]
Explicitly handle CXXExprWithTemporaries during CFG construction by just visiting the subexpression. While we don't do anything intelligent right now, this obviates a bogus -Wunreahable-code warning reported in PR 6130.
Tom Care [Fri, 27 Aug 2010 22:46:32 +0000 (22:46 +0000)]
Enabled relaxed LiveVariables analysis in the path-sensitive engine to increase the coverage of bugs. Primarily affects IdempotentOperationChecker.
- Migrated a temporarily separated test back to its original file (bug has been fixed, null-deref-ps-temp.c -> null-deref-ps.c)
- Changed SymbolManager to use relaxed LiveVariables
- Updated several test cases that the IdempotentOperationChecker class now flags
- Added test case to test relaxed LiveVariables use by the IdempotentOperationChecker
Tom Care [Fri, 27 Aug 2010 22:30:10 +0000 (22:30 +0000)]
Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor
Ted Kremenek [Fri, 27 Aug 2010 21:34:58 +0000 (21:34 +0000)]
Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.
Douglas Gregor [Fri, 27 Aug 2010 21:18:54 +0000 (21:18 +0000)]
Implement the "call super" code completion for C++. If the virtual
member function you're typing in overrides another virtual function,
this fills in a (qualified!) call to that virtual function to make
such delegation easy.
Douglas Gregor [Fri, 27 Aug 2010 15:10:57 +0000 (15:10 +0000)]
Add a super-cool code completion for send-to-super. When we're typing
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).
John McCall [Fri, 27 Aug 2010 09:08:28 +0000 (09:08 +0000)]
Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.
Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.
Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.
Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.
John McCall [Thu, 26 Aug 2010 23:41:50 +0000 (23:41 +0000)]
One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.
Ted Kremenek [Thu, 26 Aug 2010 22:19:33 +0000 (22:19 +0000)]
Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.
Chris Lattner [Thu, 26 Aug 2010 20:05:13 +0000 (20:05 +0000)]
fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.
John McCall [Thu, 26 Aug 2010 17:42:30 +0000 (17:42 +0000)]
...I forgot to check my new test after adding it, and lo, there's slightly different
behavior in C than in C++ (which is what the original test case was).
Douglas Gregor [Thu, 26 Aug 2010 16:36:48 +0000 (16:36 +0000)]
When code-completing a potential call to a C++ non-static member
function, take into account the qualifiers on the object argument
(e.g., what will become "this"), filtering around uncallable member
functions and giving a slight priority boost to those with
exactly-matching qualifiers.
Douglas Gregor [Thu, 26 Aug 2010 13:48:20 +0000 (13:48 +0000)]
Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.