]> granicus.if.org Git - clang/log
clang
12 years agoGuard private fields that are unused in Release builds with #ifndef NDEBUG.
Benjamin Kramer [Sat, 16 Jun 2012 21:48:23 +0000 (21:48 +0000)]
Guard private fields that are unused in Release builds with #ifndef NDEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158609 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoclang/lib/Basic/FileManager.cpp: Detect the root directory with PathV2. It should...
NAKAMURA Takumi [Sat, 16 Jun 2012 06:04:10 +0000 (06:04 +0000)]
clang/lib/Basic/FileManager.cpp: Detect the root directory with PathV2. It should be better fix for PR10331, or, "clang X:\foo.c" fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158596 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc...
NAKAMURA Takumi [Sat, 16 Jun 2012 06:04:05 +0000 (06:04 +0000)]
ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc. LangOpts.MicrosoftExt still appends "class type_info;".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158595 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExplicitly build __builtin_va_list.
Meador Inge [Sat, 16 Jun 2012 03:34:49 +0000 (03:34 +0000)]
Explicitly build __builtin_va_list.

The target specific __builtin_va_list types are now explicitly built instead
of injecting strings into the preprocessor input.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix Sema and IRGen for atomic compound assignment so it has the right semantics when...
Eli Friedman [Sat, 16 Jun 2012 02:19:17 +0000 (02:19 +0000)]
Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved.
(As far as I can tell, this only affects some edge cases.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158591 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Array CompoundLiteralExprs need to be treated like lvalues.
Jordan Rose [Sat, 16 Jun 2012 01:28:03 +0000 (01:28 +0000)]
[analyzer] Array CompoundLiteralExprs need to be treated like lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158588 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Return an UnknownVal when we try to get the binding for a VLA.
Jordan Rose [Sat, 16 Jun 2012 01:28:00 +0000 (01:28 +0000)]
[analyzer] Return an UnknownVal when we try to get the binding for a VLA.

This happens in C++ mode right at the declaration of a struct VLA;
MallocChecker sees a bind and tries to get see if it's an escaping bind.
It's likely that our handling of this is still incomplete, but it fixes a
crash on valid without disturbing anything else for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158587 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[AST/libclang] Fix the selector locations that are reported for a
Argyrios Kyrtzidis [Sat, 16 Jun 2012 00:46:02 +0000 (00:46 +0000)]
[AST/libclang] Fix the selector locations that are reported for a
method definition that has its '{' attached to the method name without
a space.

With a method like:

-(id)meth{
.....
}

the logic in ObjCMethodDecl that determined the selector locations got
confused because it was initialized based on an end location for '{' but
that end location changed to '}' after the method was finished.

Fix this by having an immutable end location for the declarator and
for getLocEnd() get the end location from the body itself.

Fixes rdar://11659739.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158583 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the analyzer site a single point of reference for info
Anna Zaks [Sat, 16 Jun 2012 00:30:21 +0000 (00:30 +0000)]
Make the analyzer site a single point of reference for info
on controlling diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158581 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Buffers passed to CGBitmapContextCreate can escape.
Jordan Rose [Sat, 16 Jun 2012 00:09:20 +0000 (00:09 +0000)]
[analyzer] Buffers passed to CGBitmapContextCreate can escape.

Specifically, although the bitmap context does not take ownership of the
buffer (unlike CGBitmapContextCreateWithData), the data buffer can be extracted
out of the created CGContextRef. Thus the buffer is not leaked even if its
original pointer goes out of scope, as long as
- the context escapes, or
- it is retrieved via CGBitmapContextGetData and freed.

Actually implementing that logic is beyond the current scope of MallocChecker,
so for now CGBitmapContextCreate goes on our system function exception list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158579 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the ".*" operator work correctly when the base is a prvalue and the field has...
Eli Friedman [Fri, 15 Jun 2012 23:51:06 +0000 (23:51 +0000)]
Make the ".*" operator work correctly when the base is a prvalue and the field has a non-trivial copy constructor.  PR13097.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158578 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRecover when correcting an unknown type name to a keyword like "struct".
Kaelyn Uhrain [Fri, 15 Jun 2012 23:45:58 +0000 (23:45 +0000)]
Recover when correcting an unknown type name to a keyword like "struct".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158573 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove isCXXSimpleTypeSpecifier from Parser to Sema and tweak it for wider use.
Kaelyn Uhrain [Fri, 15 Jun 2012 23:45:51 +0000 (23:45 +0000)]
Move isCXXSimpleTypeSpecifier from Parser to Sema and tweak it for wider use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158572 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[-E] Emit a rewritten _Pragma on its own line.
Jordan Rose [Fri, 15 Jun 2012 23:33:51 +0000 (23:33 +0000)]
[-E] Emit a rewritten _Pragma on its own line.

1. Teach Lexer that pragma lexers are like macro expansions at EOF.
2. Treat pragmas like #define/#undef when printing.
3. If we just printed a directive, add a newline before any more tokens.
(4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp)

PR10594 and <rdar://problem/11562490> (two separate related problems)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158571 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape < characters in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 22:43:14 +0000 (22:43 +0000)]
Documentation cleanup: escape < characters in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158569 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: Escaped # characters in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 22:38:06 +0000 (22:38 +0000)]
Documentation cleanup: Escaped # characters in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158568 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: Escaped backslashes in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 22:33:08 +0000 (22:33 +0000)]
Documentation cleanup: Escaped backslashes in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158567 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: fix a type, LocatioinE -> LocationE
James Dennett [Fri, 15 Jun 2012 22:32:14 +0000 (22:32 +0000)]
Documentation cleanup: fix a type, LocatioinE -> LocationE

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158566 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape Objective-C @keywords in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 22:30:14 +0000 (22:30 +0000)]
Documentation cleanup: escape Objective-C @keywords in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158565 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: Made a parameter name in a \param command match the code
James Dennett [Fri, 15 Jun 2012 22:28:09 +0000 (22:28 +0000)]
Documentation cleanup: Made a parameter name in a \param command match the code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158564 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 22:23:43 +0000 (22:23 +0000)]
Documentation cleanup:
* Escaped "::" and "<" as needed in Doxygen comments;
* Marked up code examples with \code...\endcode;
* Documented a \param that is current, instead of a few that aren't;
* Fixed up some \file and \brief comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158562 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 22:10:14 +0000 (22:10 +0000)]
Documentation cleanup:
* Escaped Objective-C @keywords in Doxygen comments;
* Documented more accurate \params;
* Exposed some more summaries using \brief.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158559 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a missing initializer in ASTBitCodes.h
Dmitri Gribenko [Fri, 15 Jun 2012 22:07:06 +0000 (22:07 +0000)]
Add a missing initializer in ASTBitCodes.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158558 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 21:59:54 +0000 (21:59 +0000)]
Documentation cleanup:
* Escaped # characters in Doxygen comments;
* Added Doxygen markup (\brief, \code, \file, \namespace).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158557 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: fixed/created some /brief function summaries.
James Dennett [Fri, 15 Jun 2012 21:54:36 +0000 (21:54 +0000)]
Documentation cleanup: fixed/created some /brief function summaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158555 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape # in a Doxygen comment.
James Dennett [Fri, 15 Jun 2012 21:48:19 +0000 (21:48 +0000)]
Documentation cleanup: escape # in a Doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158554 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 21:43:55 +0000 (21:43 +0000)]
Documentation cleanup:
* Escaped the # of #define in Doxygen comments;
* Formatting: Annotated __VA_ARGS__ with \c;
* Converted docs to use \brief to provide summaries;
* Fixed a typo: disbles -> disables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158553 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape backslashes in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 21:36:54 +0000 (21:36 +0000)]
Documentation cleanup: escape backslashes in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158552 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: delete doc comments from source files where they are
James Dennett [Fri, 15 Jun 2012 21:30:06 +0000 (21:30 +0000)]
Documentation cleanup: delete doc comments from source files where they are
broken duplicates of comments that are in the corresponding header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158550 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape # in a Doxygen comment.
James Dennett [Fri, 15 Jun 2012 21:28:23 +0000 (21:28 +0000)]
Documentation cleanup: escape # in a Doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158549 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape @ in a Doxygen comment.
James Dennett [Fri, 15 Jun 2012 21:27:44 +0000 (21:27 +0000)]
Documentation cleanup: escape @ in a Doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158548 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation fix (cleaning up my own breakage): close <tt> with </tt>,
James Dennett [Fri, 15 Jun 2012 21:23:13 +0000 (21:23 +0000)]
Documentation fix (cleaning up my own breakage): close <tt> with </tt>,
not with another <tt>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158546 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStop referring to functions as methods in per-function fallthrough-checking.
Sean Hunt [Fri, 15 Jun 2012 21:22:05 +0000 (21:22 +0000)]
Stop referring to functions as methods in per-function fallthrough-checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158545 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.
Jordan Rose [Fri, 15 Jun 2012 18:19:56 +0000 (18:19 +0000)]
[completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.

Specifically, @[] and @{} didn't have a type associated with them; we now
use "NSArray *" and "NSDictionary *", respectively. @"" has the type
"NSString *". @(), unfortunately, has type "id", since it (currently) may
be either an NSNumber or an NSString.

Add a test for all the Objective-C at-expression completions.

<rdar://problem/11507708&11507668&11507711>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158533 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] RetainCount: don't track objects init'd with a delegate
Jordan Rose [Fri, 15 Jun 2012 18:19:52 +0000 (18:19 +0000)]
[analyzer] RetainCount: don't track objects init'd with a delegate

We already didn't track objects that have delegates or callbacks or
objects that are passed through void * "context pointers". It's a
not-uncommon pattern to release the object in its callback, and so
the leak message we give is not very helpful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158532 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWarn when a static variable is referenced in a non-static inline function.
Jordan Rose [Fri, 15 Jun 2012 18:19:48 +0000 (18:19 +0000)]
Warn when a static variable is referenced in a non-static inline function.

This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++,
probably because by default file-scope const/constexpr variables have internal
linkage, while functions have external linkage. There's also the issue of
anonymous namespaces to consider. Nevertheless, there should probably be a
similar warning, since the semantics of inlining a function that references
a variable with internal linkage do not seem well-defined.

<rdar://problem/11577619>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158531 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest that -Wauto-var-id fires in value-dependent contexts.
Jordan Rose [Fri, 15 Jun 2012 18:19:43 +0000 (18:19 +0000)]
Test that -Wauto-var-id fires in value-dependent contexts.

There was already a test that it did not fire in type-dependent contexts.
This was already behaving correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158530 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCheck the parameter lists and return type of both blocks and lambdas
Douglas Gregor [Fri, 15 Jun 2012 16:59:29 +0000 (16:59 +0000)]
Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in
PR13117.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHeaders/xopintrin.h: Try to fix r158492. Did you mean, mm256?
NAKAMURA Takumi [Fri, 15 Jun 2012 13:37:44 +0000 (13:37 +0000)]
Headers/xopintrin.h: Try to fix r158492. Did you mean, mm256?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158521 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation fix: Add a missing parameter name for a \param command
James Dennett [Fri, 15 Jun 2012 09:04:10 +0000 (09:04 +0000)]
Documentation fix: Add a missing parameter name for a \param command

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158512 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation fix: made the name given to \param match the code.
James Dennett [Fri, 15 Jun 2012 09:02:08 +0000 (09:02 +0000)]
Documentation fix: made the name given to \param match the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158511 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 08:55:05 +0000 (08:55 +0000)]
Documentation cleanup:
* Converted comments to use \brief to provide summaries;
* Fixed uses of \arg that should be \p;
* Fixed \param [in] [out] to \param [in,out];
* Made minor formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158510 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: use \p ParameterName when referring to a parameter,
James Dennett [Fri, 15 Jun 2012 08:49:07 +0000 (08:49 +0000)]
Documentation cleanup: use \p ParameterName when referring to a parameter,
not \arg ParameterName (which should be used only when documenting that
parameter, not when referring to it from elsewhere).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158509 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a documentation typo: \\brief -> \brief
James Dennett [Fri, 15 Jun 2012 08:37:50 +0000 (08:37 +0000)]
Fix a documentation typo: \\brief -> \brief

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158507 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: fix \params to match the code.
James Dennett [Fri, 15 Jun 2012 08:35:42 +0000 (08:35 +0000)]
Documentation cleanup: fix \params to match the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158506 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 08:32:48 +0000 (08:32 +0000)]
Documentation cleanup:
* Escaped @ symbols that shouldn't be interpreted by Doxygen;
* Deleted \param documentation for function parameters that no longer exist;
* Fixed parameter names in \param Doxygen commands;
* Fixed some broken formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158505 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: eliminated Doxygen warnings by deleting a doc comment
James Dennett [Fri, 15 Jun 2012 08:02:32 +0000 (08:02 +0000)]
Documentation cleanup: eliminated Doxygen warnings by deleting a doc comment
on ASTContext::CreateTypeSourceInfo that duplicated information from the
(more complete) version in ASTContext.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158504 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 07:41:35 +0000 (07:41 +0000)]
Documentation cleanup:
* Add \brief to produce a summary in the Doxygen output;
* Add missing parameter names to \param commands;
* Fix mismatched parameter names for \param commands;
* Add a parameter name so that the \param has a target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158503 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation fixes: Added \brief markup and fixed some formatting.
James Dennett [Fri, 15 Jun 2012 07:35:42 +0000 (07:35 +0000)]
Documentation fixes: Added \brief markup and fixed some formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158501 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Fri, 15 Jun 2012 07:13:21 +0000 (07:13 +0000)]
Documentation cleanup:
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158498 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: escape Objective-C @ symbols in Doxygen comments.
James Dennett [Fri, 15 Jun 2012 06:52:33 +0000 (06:52 +0000)]
Documentation cleanup: escape Objective-C @ symbols in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158495 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: fix erroneous uses of \arg.
James Dennett [Fri, 15 Jun 2012 06:48:13 +0000 (06:48 +0000)]
Documentation cleanup: fix erroneous uses of \arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158494 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd XOP frcz instrinsics.
Craig Topper [Fri, 15 Jun 2012 06:33:42 +0000 (06:33 +0000)]
Add XOP frcz instrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158492 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOngoing documentation cleanup:
James Dennett [Fri, 15 Jun 2012 06:26:16 +0000 (06:26 +0000)]
Ongoing documentation cleanup:
* Added/tidied \brief summaries;
* Escaped # as needed for Doxygen;
* Drive-by: Fixed a rogue line > 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158491 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup for clang-c:
James Dennett [Fri, 15 Jun 2012 05:41:51 +0000 (05:41 +0000)]
Documentation cleanup for clang-c:
* Add parameter names to various \param commands;
* Ensure that \brief summaries are followed by blank lines where needed to
  prevent subsequent text being merged into the summary;
* Mark code examples with \code...\endcode so that they're appropriately
  formatted by Doxygen.
* Add qualification for links to field of structs (specifically callbacks);
* Escape #, @ and < as needed to avoid them being interpreted by Doxygen;
* Remove incorrect uses of "\see name", preferring #name;
* Fix a glitchy "\param Returns..." to be "\returns";
* Fix parameter names given to \param, typos and otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158489 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIt turns out that implementing the rethrow-on-fallthrough
John McCall [Fri, 15 Jun 2012 05:27:05 +0000 (05:27 +0000)]
It turns out that implementing the rethrow-on-fallthrough
semantics of a ctor/dtor function-try-block catch handler
by pushing a normal cleanup is not just overkill but actually
actively wrong when the handler contains an explicit return
(which is only legal in a dtor).  Just emit the rethrow as
ordinary code at the fallthrough point.  Fixes PR13102.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158488 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR12717: Clang supports hexadecimal floating-point literals in all language
Richard Smith [Fri, 15 Jun 2012 05:07:49 +0000 (05:07 +0000)]
PR12717: Clang supports hexadecimal floating-point literals in all language
modes. For languages other than C99/C11, this isn't quite a conforming
extension, and for C++11, it breaks some reasonable code containing
user-defined literals.

In languages which don't officially have hexfloats, pare back this extension
to only apply in cases where the token starts 0x and does not contain an
underscore. The extension is still not quite conforming, but it's a lot closer
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158487 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOngoing documentation cleanup: fixed Doxygen markup errors, added \brief
James Dennett [Fri, 15 Jun 2012 04:35:30 +0000 (04:35 +0000)]
Ongoing documentation cleanup: fixed Doxygen markup errors, added \brief
annotations in many places where it involved little change, fixed some
examples and marked code examples with \code...\endcode, and changed a few
nearby mentions of C++0x to refer to C++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158486 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix PR13065.
David Blaikie [Fri, 15 Jun 2012 00:47:13 +0000 (00:47 +0000)]
Fix PR13065.

This condition (added in r158093) was overly conservative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158483 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix T* p to T *p
Richard Trieu [Thu, 14 Jun 2012 23:18:09 +0000 (23:18 +0000)]
Fix T* p to T *p

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158478 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse a proper visitor to recursively check for uninitialized use in constructors.
Richard Trieu [Thu, 14 Jun 2012 23:11:34 +0000 (23:11 +0000)]
Use a proper visitor to recursively check for uninitialized use in constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158477 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStill more Doxygen documentation fixes:
James Dennett [Thu, 14 Jun 2012 21:40:34 +0000 (21:40 +0000)]
Still more Doxygen documentation fixes:
* Escape #, < and @ symbols where Doxygen would try to interpret them;
* Fix several function param documentation where names had got out of sync;
* Delete param documentation referring to parameters that no longer exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158472 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLook at incomplete FunctionTemplateDecls in order to determine whether
Daniel Jasper [Thu, 14 Jun 2012 20:56:06 +0000 (20:56 +0000)]
Look at incomplete FunctionTemplateDecls in order to determine whether
a CXXRecordDecl is complete. Fixes Bug 13086.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158469 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove absolute path form include test.
David Blaikie [Thu, 14 Jun 2012 19:55:56 +0000 (19:55 +0000)]
Remove absolute path form include test.

Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158464 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSupport -f[no-]rewrite-includes from the driver.
David Blaikie [Thu, 14 Jun 2012 18:55:27 +0000 (18:55 +0000)]
Support -f[no-]rewrite-includes from the driver.

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158463 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSupport -frewrite-includes as an option while preprocessing.
David Blaikie [Thu, 14 Jun 2012 17:36:09 +0000 (17:36 +0000)]
Support -frewrite-includes as an option while preprocessing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158460 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix crash on missing header in -rewrite-includes.
David Blaikie [Thu, 14 Jun 2012 17:36:05 +0000 (17:36 +0000)]
Fix crash on missing header in -rewrite-includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158459 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename -rewrite-includes to -frewrite-includes.
David Blaikie [Thu, 14 Jun 2012 17:36:01 +0000 (17:36 +0000)]
Rename -rewrite-includes to -frewrite-includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158458 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis makes SemaCodeComplete.cpp more Doxygen-friendly by changing the
James Dennett [Thu, 14 Jun 2012 03:11:41 +0000 (03:11 +0000)]
This makes SemaCodeComplete.cpp more Doxygen-friendly by changing the
OBJC_AT_KEYWORD_NAME take a string literal argument where previously
its second argument was an unquoted token; macro invocations such as
OBJC_AT_KEYWORD_NAME(NeedAt,{) confuse Doxygen's parser.

While I'm wary of changing code (rather than just comments) to work
around Doxygen's limitations, in this case the change makes the code
more readable for human beings as well, and the macro derived no
benefit from using the preprocessor's stringification operator, as
it never has need of the unquoted token.

I've also included a couple of trivial drive-by fixes to doc comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158440 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd triples to keep make test work on Windows, where wchar_t is only 16
Richard Trieu [Wed, 13 Jun 2012 23:15:33 +0000 (23:15 +0000)]
Add triples to keep make test work on Windows, where wchar_t is only 16
bits wide.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158425 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unnecessary output redirection in a test.
Richard Trieu [Wed, 13 Jun 2012 22:31:48 +0000 (22:31 +0000)]
Remove unnecessary output redirection in a test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158424 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/Driver/warning-options.cpp: Mark as XFAIL:cygming. -pedantic is passed with...
NAKAMURA Takumi [Wed, 13 Jun 2012 22:23:15 +0000 (22:23 +0000)]
test/Driver/warning-options.cpp: Mark as XFAIL:cygming. -pedantic is passed with gcc-as driver. PR12920

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158423 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMore doxygen/documentation cleanups.
James Dennett [Wed, 13 Jun 2012 22:07:09 +0000 (22:07 +0000)]
More doxygen/documentation cleanups.

This reduces the number of warnings generated by Doxygen by about 100
(roughly 10%).  Issues addressed:
(1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments
when they're not supposed to be Doxygen commands or links, and
similarly for "<baz>" when it's not intended as as HTML tag;
(2) Changed some \t commands (which don't exist) to \c ("to refer to a
word of code", as the Doxygen manual says);
(3) \precondition becomes \pre;
(4) When touching comments, deleted a couple of spurious spaces in them;
(5) Changed some \n and \r to \\n and \\r;
(6) Fixed one tiny typo: #pragms -> #pragma.

This patch touches documentation/comments only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename a loop variable to silence a gcc warning.
Richard Trieu [Wed, 13 Jun 2012 20:52:36 +0000 (20:52 +0000)]
Rename a loop variable to silence a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158420 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd -isystem-prefix and -ino-system-prefix arguments, which can be used to
Richard Smith [Wed, 13 Jun 2012 20:27:03 +0000 (20:27 +0000)]
Add -isystem-prefix and -ino-system-prefix arguments, which can be used to
override whether headers are system headers by checking for prefixes of the
header name specified in the #include directive.

This allows warnings to be disabled for third-party code which is found in
specific subdirectories of include paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158418 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMoved the StringLiteral printing code from StmtPrinter into the StringLiteral
Richard Trieu [Wed, 13 Jun 2012 20:25:24 +0000 (20:25 +0000)]
Moved the StringLiteral printing code from StmtPrinter into the StringLiteral
class and have StmtPrinter and StmtDumper refer to it.  This fixes an
assertion failure when dumping wchar string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158417 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoProvide a -no-pedantic to cancel out -pedantic.
John McCall [Wed, 13 Jun 2012 19:48:01 +0000 (19:48 +0000)]
Provide a -no-pedantic to cancel out -pedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158416 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDoc fixed as proposed (and mostly contributed) by David Roethlisberger.
Manuel Klimek [Wed, 13 Jun 2012 19:40:46 +0000 (19:40 +0000)]
Doc fixed as proposed (and mostly contributed) by David Roethlisberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158415 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix issue where a token paste which forms a /* or // would discard the rest of
Richard Smith [Wed, 13 Jun 2012 19:02:56 +0000 (19:02 +0000)]
Fix issue where a token paste which forms a /* or // would discard the rest of
the input: token-pasting was producing a tok::eof.

Patch by Andy Gibbs!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158412 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAllow __attribute__((unused)) for fields and make it silence
Daniel Jasper [Wed, 13 Jun 2012 18:31:09 +0000 (18:31 +0000)]
Allow __attribute__((unused)) for fields and make it silence
-Wunused-private-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158411 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove the trailing backslash from the comment to remove the warning about
Kaelyn Uhrain [Wed, 13 Jun 2012 17:05:13 +0000 (17:05 +0000)]
Remove the trailing backslash from the comment to remove the warning about
a multi-line comment, fixing builds with e.g. -Werror=comment enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158406 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename shouldVisitImplicitDeclarations to shouldVisitImplicitCode.
Daniel Jasper [Wed, 13 Jun 2012 07:12:33 +0000 (07:12 +0000)]
Rename shouldVisitImplicitDeclarations to shouldVisitImplicitCode.
Fix RecursiveASTVisitor to visit CXXForRangeStmts accordingly to visit
implicit or explicit code.

The key bug that inspired this was the Visitor not visiting the range
initializer of such a loop, which is explicit code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158395 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix off-by-one error in UTF-16 encoding: don't try to use a surrogate pair for U...
Richard Smith [Wed, 13 Jun 2012 05:41:29 +0000 (05:41 +0000)]
Fix off-by-one error in UTF-16 encoding: don't try to use a surrogate pair for U+FFFF.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158391 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape...
Richard Smith [Wed, 13 Jun 2012 05:37:23 +0000 (05:37 +0000)]
PR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape sequences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158390 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake clang-tblgen backends functions instead of TableGenBackends.
Jakob Stoklund Olesen [Wed, 13 Jun 2012 05:12:41 +0000 (05:12 +0000)]
Make clang-tblgen backends functions instead of TableGenBackends.

Get rid of a bunch of header files. TableGen output should be unaffected.

Patch by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158388 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate clang attribute document.
Michael Han [Wed, 13 Jun 2012 03:51:05 +0000 (03:51 +0000)]
Update clang attribute document.

Remove the instructions on manually adding boilerplate code of AttributeList::Kind and AttributeList::getKind().
Both are now generated by tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158386 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing narrowing check: converting from a signed integral type to a wider
Richard Smith [Wed, 13 Jun 2012 01:07:41 +0000 (01:07 +0000)]
Add missing narrowing check: converting from a signed integral type to a wider
unsigned type is narrowing if the source is non-constant or negative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158377 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGrab bag of Microsoft Mangler fixes:
Charles Davis [Wed, 13 Jun 2012 00:18:14 +0000 (00:18 +0000)]
Grab bag of Microsoft Mangler fixes:

- Support mangling virtual function tables (base tables need work on the
  ManglerContext interface).
- Correct mangling of local scopes (i.e. functions and C++ methods).
- Replace every llvm_unreachable() for actually-reachable code with a
  diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158376 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
Chad Rosier [Tue, 12 Jun 2012 20:30:26 +0000 (20:30 +0000)]
[ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
statements are allowed on the same line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158372 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix test to work when clang is built without powerpc64 support.
Bob Wilson [Tue, 12 Jun 2012 20:22:45 +0000 (20:22 +0000)]
Fix test to work when clang is built without powerpc64 support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158370 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline-asm] Cleanup MS style inline assembly parsing.
Chad Rosier [Tue, 12 Jun 2012 19:03:42 +0000 (19:03 +0000)]
[ms-inline-asm] Cleanup MS style inline assembly parsing.

Specifically, improve the handling of whitespace, stop saving tokens that are
in comments and fix the case where we have a comment followed by a closing brace
on the next line.

Unfortunately, there's no easy way of testing this code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158367 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd documentation for the JSON compilation database format.
Manuel Klimek [Tue, 12 Jun 2012 17:51:04 +0000 (17:51 +0000)]
Add documentation for the JSON compilation database format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158365 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen code completion walks the members of a protocol or interface,
Douglas Gregor [Tue, 12 Jun 2012 13:44:08 +0000 (13:44 +0000)]
When code completion walks the members of a protocol or interface,
make sure that we walk the definition. Fixes <rdar://problem/11427742>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158357 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] WWW: Shorten the menu title.
Anna Zaks [Tue, 12 Jun 2012 13:18:20 +0000 (13:18 +0000)]
[analyzer] WWW: Shorten the menu title.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158356 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused variable.
Bill Wendling [Tue, 12 Jun 2012 06:53:25 +0000 (06:53 +0000)]
Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158353 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd XOP permute intrinsics.
Craig Topper [Tue, 12 Jun 2012 06:03:35 +0000 (06:03 +0000)]
Add XOP permute intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158351 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIf parsing a trailing-return-type fails, don't pretend we didn't have one at
Richard Smith [Tue, 12 Jun 2012 01:51:59 +0000 (01:51 +0000)]
If parsing a trailing-return-type fails, don't pretend we didn't have one at
all. Suppresses follow-on errors mentioned in PR13074.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158348 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCorrect comment. The return type was changed to const Type* in r123814. Patch by...
Dmitri Gribenko [Tue, 12 Jun 2012 01:21:44 +0000 (01:21 +0000)]
Correct comment.  The return type was changed to const Type* in r123814.  Patch by David Röthlisberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158347 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused variable.
Dmitri Gribenko [Tue, 12 Jun 2012 00:43:19 +0000 (00:43 +0000)]
Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158343 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert "[analyzer] Treat LValueBitCasts like regular pointer bit casts."
Jordan Rose [Tue, 12 Jun 2012 00:20:22 +0000 (00:20 +0000)]
Revert "[analyzer] Treat LValueBitCasts like regular pointer bit casts."

This does not actually give us the right behavior for reinterpret_cast
of references. Reverting so I can think about it some more.

This reverts commit 50a75a6e26a49011150067adac556ef978639fe6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158341 91177308-0d34-0410-b5e6-96231b3b80d8