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

25809 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Gribenko d558b5238d Cleanup \brief comment. Since it is a single paragraph, no need to save newlines there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159325 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 01:38:21 +00:00
Eric Christopher da970d2fe0 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 01:20:05 +00:00
Bill Wendling 2a5d644bcf Update the #include to find the DebugInfo.h in the correct place
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159315 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 00:30:19 +00:00
Dmitri Gribenko f199b9cd4a Teach \brief parser about commands that start a new paragraph implicitly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159309 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 00:01:41 +00:00
Argyrios Kyrtzidis af505c5822 Fix uninitialized variable use bug found by the clairvoyant static analyzer.
Commit::canReplaceText would not initialize its out 'Len' parameter before
returning true and it would be used uninitialized in Commit::replaceText.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159306 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:45:44 +00:00
Dmitri Gribenko 8bdb58a783 Attaching documentation comments to declarations: don't attach a comment to a declaration if there is a preprocessor directive between them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159305 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:43:37 +00:00
Dmitri Gribenko 5676d32a23 Fix an infinite loop in comment lexer: we were not advancing in the input character stream when we saw a '<' that is not a start of an HTML tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 23:28:29 +00:00
Eli Friedman f4bcfa1b18 Propagate lvalue alignment into bitfields. Per report on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159295 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 21:19:48 +00:00
Fariborz Jahanian 7c16d58f85 objective-c mrc: Issue warning for mrc, as is done for arc, when
property retains a block object as it could be on 
the stack. // rdar://11761511


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159293 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 20:52:46 +00:00
Richard Smith e1971a136a Refactoring after r159290: don't hold onto and check a misleading QualType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159292 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 20:29:39 +00:00
Richard Smith 83ea530f9d Check for non-POD vararg argument type after default argument promotion, not
before, so we don't incorrectly think arguments of function type are non-POD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159290 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 20:23:58 +00:00
Fariborz Jahanian 12d2cc71bf patch to suggest 'static' function should be 'static inline'
when it appears to be unused and occurs in a header.
// rdar://11202617


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159282 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 19:43:29 +00:00
Rafael Espindola 8d852e35ad Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 18:18:05 +00:00
Rafael Espindola 0713d993cd Fix a crash I introduced in r159212.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159279 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 17:44:39 +00:00
Dmitri Gribenko 962668d2c1 Remove unsigned and a pointer from a comment token (so that each token can have only one semantic string value attached to it), at a cost of adding an additional token.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159270 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 16:53:58 +00:00
Dmitri Gribenko f5e0aeac8a Comment lexer: counting backwards from token end is thought to be confusing. We already have a pointer to the beginning of the token, so use it to extract the text instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159269 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 16:30:35 +00:00
Axel Naumann 446ba14432 Fix for r159256 on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159262 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 11:42:56 +00:00
Axel Naumann 3ce42c37b0 From Vassil Vassilev:
add interface for removing a FileEntry from the cache.
Forces a re-read the contents from disk, e.g. because a tool (like cling) wants to pick up a modified file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159256 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 09:17:42 +00:00
Dmitri Gribenko 1e15e3b78c Initialize RawComment::BriefTextValid in other constructor, too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159253 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 05:48:36 +00:00
Daniel Jasper 2dc509d893 Introduce __has_feature(attribute_unused_on_fields) to determine whether
the current version of clang understands __attribute__((unused)) on
fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 05:12:34 +00:00
Dmitri Gribenko c0b8324d6f Simplify logic in BriefParser::Parse(), per Jordan's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 01:17:34 +00:00
Jordan Rose 29299c6c98 [analyzer] RetainCountChecker: remove unused SelfOwn ArgEffect kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 00:51:18 +00:00
Jordan Rose 4715ed95e3 [analyzer] Remove unneeded helper function (it's in ASTContext.h)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 00:51:16 +00:00
Chad Rosier 8decdee5fd Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159235 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 22:30:43 +00:00
Timur Iskhodzhanov 4285f84a5c [Windows] Improve mangling of templates when back references are present
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159234 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 22:29:50 +00:00
Benjamin Kramer 92c4fd5c17 Enable -mcpu=native and -march=native for arm targets.
This is only implemented on linux at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 22:20:06 +00:00
Chad Rosier 91cbbbf506 Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159229 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 21:41:40 +00:00
Fariborz Jahanian 540f9ae102 preprocessing: gcc supports #line 0. So, treat this
as a gcc supported extension with usual treatment
with -pedantic (warn) and -pedantic-errors (error).
// rdar://11550996


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 21:19:20 +00:00
Richard Smith 4622fe85ab Remove typedef which is unused after r159189.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 20:54:26 +00:00
Dmitri Gribenko 2d44d77fed Implement a lexer for structured comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 20:39:18 +00:00
Manman Ren 5283c99365 X86: add GATHER intrinsics (AVX2) in Clang
Support the following intrinsics:
  _mm_mask_i32gather_pd, _mm256_mask_i32gather_pd, _mm_mask_i64gather_pd
  _mm256_mask_i64gather_pd, _mm_mask_i32gather_ps, _mm256_mask_i32gather_ps
  _mm_mask_i64gather_ps, _mm256_mask_i64gather_ps


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159222 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 19:55:09 +00:00
Rafael Espindola 12582bdc2e Fix a bug in my previous patch: If we are not doing a virtual call because
the member expression is qualified, call the method specified in the code,
not the most derived one we can find.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 19:18:25 +00:00
David Blaikie 37d2a00f4c Remove spurious semicolons committed in r159216.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 18:52:09 +00:00
Richard Trieu 246b6aa676 Add template type diffing to Clang. This feature will provide a better
comparison between two templated types when they both appear in a diagnostic.
Type elision will remove indentical template arguments, which can be disabled
with -fno-elide-type.  Cyan highlighting is applied to the differing types.

For more formatting, -fdiagnostic-show-template-tree will output the template
type as an indented text tree, with differences appearing inline. Template
tree works with or without type elision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159216 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 18:18:47 +00:00
Rafael Espindola 0b4fe503ef During codegen of a virtual call we would extract any casts in the expression
to see if we had an underlying final class or method, but we would then
use the cast type to do the call, resulting in a direct call to the wrong
method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 17:45:31 +00:00
Fariborz Jahanian 4904bf4e84 block literal irgen: several improvements on naming block
literal helper functions. All helper functions (global
and locals) use block_invoke as their prefix. Local literal
helper names are prefixed by their enclosing mangled function
names. Blocks in non-local initializers (e.g. a global variable 
or a C++11 field) are prefixed by their mangled variable name. 
The descriminator number added to end of the name starts off 
with blank (for first block) and _<N> (for the N+2-th block).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 16:06:38 +00:00
Kostya Serebryany b9d2b3b8ed [asan] add missing asan instrumentation in generated global init functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159191 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 08:56:33 +00:00
Richard Smith e92b1f4917 Fix lifetime issue for backing APValue of OpaqueValueExpr in recursive
constexpr function evaluation, and corresponding ASan / valgrind issue in
tests, by storing the corresponding value with the relevant stack frame. This
also prevents re-evaluation of the source of the underlying OpaqueValueExpr,
which makes a major performance difference for certain contrived code (see
testcase update).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159189 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 08:12:11 +00:00
Nico Weber b4e8008d5e Give L__FUNCTION__ the right type in templates. PR13206.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159171 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 22:34:48 +00:00
Manman Ren 78eb76e2ee ARM: enable struct byval for APCS.
Revert r136662 which disables ARM byval.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159168 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 22:04:00 +00:00
David Blaikie d9cf8268dc PR12937: Explicitly deleting an explicit template specialization.
This works around a quirk in the way that explicit template specializations are
handled in Clang. We generate an implicit declaration from the original
template which the explicit specialization is considered to redeclare. This
trips up the explicit delete logic.

This change only works around that strange representation. At some point it'd
be nice to remove those extra declarations to make the AST more accurately
reflect the C++ semantics.

Review by Doug Gregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 21:55:30 +00:00
Richard Smith c9f3517007 Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 21:37:02 +00:00
Eli Friedman f6172aee54 Use std::map instead of llvm::DenseMap because we rely on the stability of references to values in these maps. PR13197.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159161 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 21:21:08 +00:00
Jordan Rose ee681111c7 [analyzer] Be careful about implicitly-declared operator new/delete. (PR13090)
The implicit global allocation functions do not have valid source locations,
but we still want to treat them as being "system header" functions for the
purposes of how they affect program state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159160 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 20:48:28 +00:00
Richard Smith 831421f240 Unrevert r158887, reverted in r158949, along with a fix for the bug which
resulted in it being reverted. A test for that bug was added in r158950.

Original comment:

If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159159 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 20:30:08 +00:00
DeLesley Hutchins f63797c741 Thread safety analysis: implement lock_returned attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159152 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 18:33:18 +00:00
Nico Weber 6b02009359 Make explicit specializations at class scope work
for non-type template parameters in microsoft mode.
PR12709.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159147 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-25 17:21:05 +00:00
Richard Smith bc9e558246 Add testing for CommentHandler, and fix a bug where trailing comments in #else
and #endif in non-skipped blocks were not passed to the CommentHandler. Patch
by Andy Gibbs!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159119 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-24 23:56:26 +00:00
Charles Davis 9ee494f986 IRGen: Factor v-table generation into the CGCXXABI object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159091 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-23 23:44:00 +00:00
John McCall 1e12b3d777 Recognize GNU attributes after 'enum class'. Fixes the libc++ build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159089 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-23 22:30:04 +00:00