]> granicus.if.org Git - clang/log
clang
12 years agoClean up a large number of C++11 attribute parse issues, including parsing
Sean Hunt [Sat, 23 Jun 2012 05:07:58 +0000 (05:07 +0000)]
Clean up a large number of C++11 attribute parse issues, including parsing
attributes in more places where we didn't and catching a lot more issues.

This implements nearly every aspect of C++11 attribute parsing, except for:
 - Attributes are permitted on explicit instantiations inside the declarator
   (but not preceding the decl-spec)
 - Attributes are permitted on friend declarations of functions.
 - Multiple instances of the same attribute in an attribute-list (e.g.
   [[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
   are allowed.
The first two are marked as expected-FIXME in the test file and the latter
is probably a defect and is currently untested.

Thanks to Richard Smith for providing the lion's share of the testcases.

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

12 years agoSupport L__FUNCTION__ in microsoft mode, PR11789
Nico Weber [Sat, 23 Jun 2012 02:07:59 +0000 (02:07 +0000)]
Support L__FUNCTION__ in microsoft mode, PR11789

Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.

I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.

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

12 years ago[Windows] Fix mangling of repeated types in the presence of bool and function pointer...
Timur Iskhodzhanov [Sat, 23 Jun 2012 00:54:17 +0000 (00:54 +0000)]
[Windows] Fix mangling of repeated types in the presence of bool and function pointers PR13176,PR13177

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

12 years agoMicrosoftMangle: Fix mangling of integral constant non-type template arguments in...
Charles Davis [Sat, 23 Jun 2012 00:27:49 +0000 (00:27 +0000)]
MicrosoftMangle: Fix mangling of integral constant non-type template arguments in a class specialization.

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

12 years agoMinor improvements to some C99 variadic-macro-related diagnostics.
Richard Smith [Fri, 22 Jun 2012 23:59:08 +0000 (23:59 +0000)]
Minor improvements to some C99 variadic-macro-related diagnostics.

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

12 years agoImplement initial static analysis inlining support for C++ methods.
Ted Kremenek [Fri, 22 Jun 2012 23:55:50 +0000 (23:55 +0000)]
Implement initial static analysis inlining support for C++ methods.

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

12 years agoPerform typo correction for base class specifiers.
Kaelyn Uhrain [Fri, 22 Jun 2012 23:37:05 +0000 (23:37 +0000)]
Perform typo correction for base class specifiers.

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

12 years ago[analyzer] Teach malloc checker that initWith[Bytes|Characters}NoCopy
Anna Zaks [Fri, 22 Jun 2012 22:42:30 +0000 (22:42 +0000)]
[analyzer] Teach malloc checker that initWith[Bytes|Characters}NoCopy
relinquish memory.

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

12 years ago[analyzer] Remove a statistic - it's too expensive.
Anna Zaks [Fri, 22 Jun 2012 22:24:45 +0000 (22:24 +0000)]
[analyzer] Remove a statistic - it's too expensive.

(Committed in r159038 by mistake.)

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

12 years ago[analyzer]scan-build: report the total number of steps analyzer performs
Anna Zaks [Fri, 22 Jun 2012 22:08:12 +0000 (22:08 +0000)]
[analyzer]scan-build: report the total number of steps analyzer performs

This would be useful to investigate performance issues.

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

12 years ago[analyzer] Fixup to r158958.
Anna Zaks [Fri, 22 Jun 2012 22:08:09 +0000 (22:08 +0000)]
[analyzer] Fixup to r158958.

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

12 years ago[analyzer] Report the cumulative number of steps the analyzer performs.
Anna Zaks [Fri, 22 Jun 2012 22:08:06 +0000 (22:08 +0000)]
[analyzer] Report the cumulative number of steps the analyzer performs.

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

12 years agoMark Doxygen warnings DefaultIgnore.
Dmitri Gribenko [Fri, 22 Jun 2012 20:19:59 +0000 (20:19 +0000)]
Mark Doxygen warnings DefaultIgnore.

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

12 years agorevert CodeGen support for the alloc_size attribute until we finish the design of...
Nuno Lopes [Fri, 22 Jun 2012 18:01:38 +0000 (18:01 +0000)]
revert CodeGen support for the alloc_size attribute until we finish the design of a more generic metadata node

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

12 years agoDisable llvm optimizations in a clang test.
Rafael Espindola [Fri, 22 Jun 2012 17:28:01 +0000 (17:28 +0000)]
Disable llvm optimizations in a clang test.

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

12 years ago[analyzer] Check for +raise:format: on subclasses of NSException as well.
Jordan Rose [Fri, 22 Jun 2012 17:15:58 +0000 (17:15 +0000)]
[analyzer] Check for +raise:format: on subclasses of NSException as well.

We don't handle exceptions yet, so we treat them as sinks. ExprEngine
hardcodes messages that are known to raise Objective-C exceptions like -raise,
but it was only checking for +raise:format: and +raise:format:arguments: on
NSException itself, not subclasses.

<rdar://problem/11724201>

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

12 years agoThread safety analysis: fixes a bug in which locksets are not handled
DeLesley Hutchins [Fri, 22 Jun 2012 17:07:28 +0000 (17:07 +0000)]
Thread safety analysis: fixes a bug in which locksets are not handled
properly if there is a join point in the control flow graph that involves
a trylock.  Also changes the source locations of some warnings to be
more consistent.

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

12 years agoCorrect include guard to reflect new directory name
Dmitri Gribenko [Fri, 22 Jun 2012 16:52:11 +0000 (16:52 +0000)]
Correct include guard to reflect new directory name

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

12 years agoShow fixit for unqualified calls to methods of dependent bases
Nico Weber [Fri, 22 Jun 2012 16:39:39 +0000 (16:39 +0000)]
Show fixit for unqualified calls to methods of dependent bases
when the calling site is a member function template.

Effectively reverts r111675.

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

12 years agoAdd a warning about almost-Doxygen trailing comments: //< and /*< ... */
Dmitri Gribenko [Fri, 22 Jun 2012 16:02:55 +0000 (16:02 +0000)]
Add a warning about almost-Doxygen trailing comments: //< and /*< ... */

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

12 years agoobjective-c: improve diagnostic when collection expression is
Fariborz Jahanian [Fri, 22 Jun 2012 15:37:00 +0000 (15:37 +0000)]
objective-c: improve diagnostic when collection expression is
not a pointer to a fast-enumerable object. // rdar://11488666

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

12 years agoAdd release note about -gline-tables-only flag
Alexey Samsonov [Fri, 22 Jun 2012 11:18:10 +0000 (11:18 +0000)]
Add release note about -gline-tables-only flag

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

12 years agoDocumentation cleanup: making \param and \returns docs match the code.
James Dennett [Fri, 22 Jun 2012 10:32:46 +0000 (10:32 +0000)]
Documentation cleanup: making \param and \returns docs match the code.

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

12 years agoDocumentation cleanup: making \param docs match the code.
James Dennett [Fri, 22 Jun 2012 10:16:05 +0000 (10:16 +0000)]
Documentation cleanup: making \param docs match the code.

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

12 years agoDiagnostics cleanup: Fixing \params to match the code.
James Dennett [Fri, 22 Jun 2012 08:52:37 +0000 (08:52 +0000)]
Diagnostics cleanup: Fixing \params to match the code.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 08:10:18 +0000 (08:10 +0000)]
Documentation cleanup:
* Primarily fixed \param commands with names not matching any actual
  parameters of the documented functions.  In many cases this consists
  just of fixing up the parameter name in the \param to match the code,
  in some it means deleting obsolete documentation and occasionally it
  means documenting the parameter that has replaced the older one that
  was documented, which sometimes means some simple reverse-engineering
  of the docs from the implementation;
* Fixed \param ParamName [out] to the correct format with [out] before
  the parameter name;
* Fixed some \brief summaries.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:59:27 +0000 (05:59 +0000)]
Documentation cleanup:
* Added \file documentation for PPCallbacks.h;
* Added/formated \brief summaries;
* Deleted documentation for parameters that no longer exist;
* Used \param more systematically for documentation of parameters;
* Escaped # characters in Doxygen comments.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:54:32 +0000 (05:54 +0000)]
Documentation cleanup:
* Add \file documentation;
* Add \verbatim...\endverbatim markup as needed;
* Add \brief summaries;
* Escaped "::" in Doxygen comments when preceded by space, to avoid a
  Doxygen warning where Doxygen takes this as an explicit link request;
* Add \code...\endcode markup to code examples;
* Fix a grammatical glitch in "is this declarator is a".

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:46:07 +0000 (05:46 +0000)]
Documentation cleanup:
* Add \brief summaries;
* Escape # characters in Doxygen comments;
* Add \code...\endcode markup for code examples;
* Add \verbatim...\endverbatim markup for grammar productions.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:43:45 +0000 (05:43 +0000)]
Documentation cleanup:
* Add \brief summaries;
* Escaped # characters in Doxygen comments;
* Added some \see cross-references.

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

12 years agoDocumentation cleanup: Escape @objc* in Doxygen comments.
James Dennett [Fri, 22 Jun 2012 05:41:30 +0000 (05:41 +0000)]
Documentation cleanup: Escape @objc* in Doxygen comments.

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

12 years agoDocumentation cleanup: rephrase, and so avoid a Doxygen warning.
James Dennett [Fri, 22 Jun 2012 05:40:23 +0000 (05:40 +0000)]
Documentation cleanup: rephrase, and so avoid a Doxygen warning.

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

12 years agoDocumentation cleanup: escape # characters in Doxygen comments as needed.
James Dennett [Fri, 22 Jun 2012 05:39:17 +0000 (05:39 +0000)]
Documentation cleanup: escape # characters in Doxygen comments as needed.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:37:13 +0000 (05:37 +0000)]
Documentation cleanup:
* Use \p param for a parameter reference, not the (erroneous) form \arg param;
* Escape # characters in Doxygen comments as needed.

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

12 years agoDocumentation cleanup: escape # characters in Doxygen comments as needed.
James Dennett [Fri, 22 Jun 2012 05:36:05 +0000 (05:36 +0000)]
Documentation cleanup: escape # characters in Doxygen comments as needed.

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

12 years agoDocumentation cleanup: escape # characters in Doxygen comments as needed.
James Dennett [Fri, 22 Jun 2012 05:35:25 +0000 (05:35 +0000)]
Documentation cleanup: escape # characters in Doxygen comments as needed.

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

12 years agoDocumentation cleanup: escape \ characters in Doxygen comments as needed.
James Dennett [Fri, 22 Jun 2012 05:33:23 +0000 (05:33 +0000)]
Documentation cleanup: escape \ characters in Doxygen comments as needed.

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

12 years agoDocumentation cleanup: Fixed the format of the file header (that I broke in
James Dennett [Fri, 22 Jun 2012 05:32:40 +0000 (05:32 +0000)]
Documentation cleanup: Fixed the format of the file header (that I broke in
a recent commit), and eliminated a Doxygen error by changing a comment inside
a function to not be a Doxygen comment.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:20:59 +0000 (05:20 +0000)]
Documentation cleanup:
* Escaped # and < characters in Doxygen comments as needed;
* Fixed up some \brief summaries;
* Marked up some parameter references with \p;
* Added \code...\endcode around code examples;
* Used \returns a little more.

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

12 years agoDocumentation cleanup: turn "//" into "///" for a Doxygen comment.
James Dennett [Fri, 22 Jun 2012 05:14:59 +0000 (05:14 +0000)]
Documentation cleanup: turn "//" into "///" for a Doxygen comment.

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

12 years agoDocumentation cleanup:
James Dennett [Fri, 22 Jun 2012 05:06:35 +0000 (05:06 +0000)]
Documentation cleanup:
* Made \brief documentation be brief, mostly by adding a blank line to make
  the rest of the text be part of the detailed description only;
* Removed "FunctionOrClassName - " and other redundant text from the start
  of Doxygen comments.

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

12 years ago[analyzer] Malloc: Warn about use-after-free when memory ownership was
Anna Zaks [Fri, 22 Jun 2012 02:04:31 +0000 (02:04 +0000)]
[analyzer] Malloc: Warn about use-after-free when memory ownership was
transfered with dataWithBytesNoCopy.

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

12 years ago[diagtool] Write to llvm::outs() by default instead of llvm::errs()
Jordan Rose [Fri, 22 Jun 2012 00:33:20 +0000 (00:33 +0000)]
[diagtool] Write to llvm::outs() by default instead of llvm::errs()

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

12 years agoAdd the testcase from pr13168.
Rafael Espindola [Thu, 21 Jun 2012 23:49:18 +0000 (23:49 +0000)]
Add the testcase from pr13168.

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

12 years agoRevert r158887. This fixes pr13168.
Rafael Espindola [Thu, 21 Jun 2012 23:44:21 +0000 (23:44 +0000)]
Revert r158887. This fixes pr13168.

Revert "If an object (such as a std::string) with an appropriate c_str() member function"

This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e.

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

12 years agoHandle include directive with comments. It turns out that in this case comments...
Dmitri Gribenko [Thu, 21 Jun 2012 22:04:37 +0000 (22:04 +0000)]
Handle include directive with comments.  It turns out that in this case comments are not coming in source order.  Instead of trying to std::sort() comments (which can be costly), just remove comments that are not in order.

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

12 years agoobjective-c: If an ivar is (1) the first ivar in a root class and (2) named `isa`,
Fariborz Jahanian [Thu, 21 Jun 2012 21:35:15 +0000 (21:35 +0000)]
objective-c: If an ivar is (1) the first ivar in a root class and (2) named `isa`,
then it should get the same warnings that id->isa gets. // rdar://11702488

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

12 years agoVC9 does not like heterogenous compare function objects.
Dmitri Gribenko [Thu, 21 Jun 2012 21:02:45 +0000 (21:02 +0000)]
VC9 does not like heterogenous compare function objects.

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

12 years ago[analyzer] Do not step into statements while collecting function decls.
Anna Zaks [Thu, 21 Jun 2012 20:36:11 +0000 (20:36 +0000)]
[analyzer] Do not step into statements while collecting function decls.

CallGraph's recursive visitor only needs to collect declarations; their
bodies will be processed later on. RecursiveASTVisitor will recurse on
the bodies if the definition is provided along with declaration.
Optimize, by not recursing on any of the statements.

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

12 years agoPR13165: False positive when initializing member data pointers with NULL.
David Blaikie [Thu, 21 Jun 2012 18:51:10 +0000 (18:51 +0000)]
PR13165: False positive when initializing member data pointers with NULL.

This now correctly covers, I believe, all the pointer types:
* 'any' pointers (both function and data normal pointers and ObjC object pointers)
* member pointers (both function and data)
* block pointers

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

12 years agoobjective-c: deprecated C-like parameters in Objective-C
Fariborz Jahanian [Thu, 21 Jun 2012 18:43:08 +0000 (18:43 +0000)]
objective-c: deprecated C-like parameters in Objective-C
method declarations.
// rdar://11578353.

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

12 years agoAdjust this code so that it strictly honors
John McCall [Thu, 21 Jun 2012 17:46:38 +0000 (17:46 +0000)]
Adjust this code so that it strictly honors
TargetSimulatroVersionFromDefines if present;  this also makes
it easier to chain things correctly.  Noted by an internal
review.

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

12 years agoLess restrictive check in unit test for unsupported debug info options
Alexey Samsonov [Thu, 21 Jun 2012 13:30:54 +0000 (13:30 +0000)]
Less restrictive check in unit test for unsupported debug info options

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

12 years agoRevert r158423 corresponding to r158796, "test/Driver/warning-options.cpp: Mark as...
NAKAMURA Takumi [Thu, 21 Jun 2012 12:45:24 +0000 (12:45 +0000)]
Revert r158423 corresponding to r158796, "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@158915 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClang side of a refactoring of the CMake unit test build strategy.
Chandler Carruth [Thu, 21 Jun 2012 09:51:42 +0000 (09:51 +0000)]
Clang side of a refactoring of the CMake unit test build strategy.

The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages.

Among other fundamental advantages, we start to get the checking logic
for when a file is missing from the CMake build, and this caught one
missing file already! More fun details in the LLVM commit corresponding
to this one.

Note that the LLVM commit and this one most both be applied, or neither.
Sorry for any skew issues.

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

12 years agoMake the RecursiveASTVisitor visit the body of a range-based for loop
Daniel Jasper [Thu, 21 Jun 2012 08:50:04 +0000 (08:50 +0000)]
Make the RecursiveASTVisitor visit the body of a range-based for loop
again. This was broken in r158395.

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

12 years agoImprove support for -g options accepted by Clang:
Alexey Samsonov [Thu, 21 Jun 2012 08:22:39 +0000 (08:22 +0000)]
Improve support for -g options accepted by Clang:
1. Accept flags -g[0-3], -ggdb[0-3], -gdwarf-[2-4] and collapse them to simple -g (except -g0/-ggdb0).
2. Produce driver error on unsupported formats (-gcoff, -gstabs, -gvms) and options (-gtoggle).
3. Recognize and ignore flags -g[no-]strict-dwarf, -g[no-]record-gcc-switches.

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

12 years agoPretend that enum constants have enum type when inferring a block return type.
Jordan Rose [Thu, 21 Jun 2012 05:54:55 +0000 (05:54 +0000)]
Pretend that enum constants have enum type when inferring a block return type.

In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) This leads to
odd warnings when returning enum constants directly in blocks with inferred
return types. The easiest way out of this is to pretend that, like C++, enum
constants have enum type when being returned from a block.

<rdar://problem/11662489>

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

12 years agoDon't warn for -Wstatic-in-inline if the used function is also inline.
Jordan Rose [Thu, 21 Jun 2012 05:54:50 +0000 (05:54 +0000)]
Don't warn for -Wstatic-in-inline if the used function is also inline.

Also, don't warn if the used function is __attribute__((const)), in which case
it's not supposed to use global variables anyway.

The inline-in-inline thing is a heuristic, and one that's possibly incorrect
fairly often because the function being inlined could definitely use global
variables. However, even some C standard library functions are written using
other (trivial) static-inline functions in the headers, and we definitely don't
want to be warning on that (or on anything that /uses/ these trivial inline
functions). So we're using "inlined" as a marker for "fairly trivial".

(Note that __attribute__((pure)) does /not/ guarantee safety like ((const),
because ((const)) does not guarantee that global variables are not being used,
and the warning is about globals not being shared across TUs.)

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

12 years agoSwitch Clang to re-use the the newly factored common LLVM
Chandler Carruth [Thu, 21 Jun 2012 05:23:23 +0000 (05:23 +0000)]
Switch Clang to re-use the the newly factored common LLVM
implementation. Yay for '-' lines in CMake!

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

12 years agoMS: Mangle rvalue references and nullptr_t, and produce back-references when
Richard Smith [Thu, 21 Jun 2012 02:52:27 +0000 (02:52 +0000)]
MS: Mangle rvalue references and nullptr_t, and produce back-references when
appropriate. Patch by João Matos!

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

12 years agoSimplify the Clang unittest function in the CMake build, and make it
Chandler Carruth [Thu, 21 Jun 2012 02:04:39 +0000 (02:04 +0000)]
Simplify the Clang unittest function in the CMake build, and make it
match the LLVM implemenation. This also simplifies the name management
and splits the custom library management out from the unittest specific
management. It finally drops the dependency on parsing cmake arguments.

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

12 years agoRemove a goofy CMake hack and use the standard CMake facilities to
Chandler Carruth [Thu, 21 Jun 2012 01:30:21 +0000 (01:30 +0000)]
Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

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

12 years agoIf an object (such as a std::string) with an appropriate c_str() member function
Richard Smith [Thu, 21 Jun 2012 01:08:35 +0000 (01:08 +0000)]
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@158887 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove an unused feature of the clang unittest macro.
Chandler Carruth [Thu, 21 Jun 2012 00:40:48 +0000 (00:40 +0000)]
Remove an unused feature of the clang unittest macro.

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

12 years agoDo not complain about junk on the end of a #endif in a skipped block. Such junk
Richard Smith [Thu, 21 Jun 2012 00:35:03 +0000 (00:35 +0000)]
Do not complain about junk on the end of a #endif in a skipped block. Such junk
is permitted by all relevant language standards. Patch by Andy Gibbs!

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

12 years agoRawCommentList::addComment: fix the assertion so it actually checks that new comment...
Dmitri Gribenko [Thu, 21 Jun 2012 00:28:14 +0000 (00:28 +0000)]
RawCommentList::addComment: fix the assertion so it actually checks that new comment is after the last one (change Comments[0] to Comments.back()), and handle the case of two consecutive comments, e.g. /** *//* */.  There is already a testcase for that (but it didn't trigger the assert because the assert itself was wrong).

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

12 years ago[analyzer] Malloc leak false positive: Allow xpc context to escape.
Anna Zaks [Wed, 20 Jun 2012 23:35:57 +0000 (23:35 +0000)]
[analyzer] Malloc leak false positive: Allow xpc context to escape.

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

12 years agoobjective-c: place quotes around named items in a diagnostic.
Fariborz Jahanian [Wed, 20 Jun 2012 23:33:16 +0000 (23:33 +0000)]
objective-c: place quotes around named items in a diagnostic.
// rdar://11671080

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

12 years agoobjc: tweak my last patch to warn if class extension
Fariborz Jahanian [Wed, 20 Jun 2012 23:18:57 +0000 (23:18 +0000)]
objc: tweak my last patch to warn if class extension
has not overridden the property. // rdar://11656982

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

12 years agoobjective-c: Normally, a property cannot be both 'readonly' and having a
Fariborz Jahanian [Wed, 20 Jun 2012 22:57:42 +0000 (22:57 +0000)]
objective-c: Normally, a property cannot be both 'readonly' and having a
"write" attribute (copy/retain/etc.). But, property declaration in
primary class and protcols are tentative as they may be overridden
into a 'readwrite' property in class extensions. Postpone diagnosing
such warnings until the class implementation is seen.
// rdar://11656982

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

12 years agoDocumentation cleanup: escape a < character in a Doxygen comment
James Dennett [Wed, 20 Jun 2012 22:06:21 +0000 (22:06 +0000)]
Documentation cleanup: escape a < character in a Doxygen comment

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

12 years agoIntroduce ObjCRuntime::hasWeakClassImport() and use it in the appropriate
John McCall [Wed, 20 Jun 2012 21:58:02 +0000 (21:58 +0000)]
Introduce ObjCRuntime::hasWeakClassImport() and use it in the appropriate
places.  I've turned this off for the GNU runtimes --- I don't know if
they support weak class import, but it's easy enough for them to opt in.

Also tweak a comment per review by Jordan.

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

12 years agoDocumentation cleanup:
James Dennett [Wed, 20 Jun 2012 21:55:51 +0000 (21:55 +0000)]
Documentation cleanup:
* Escape < characters in Doxygen comments as needed;
* Add \code...\endcode around code examples;
* Remove an incorrect use of Doxygen's \arg command.

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

12 years agoAdded test with sizeof conditions (relies on to-be-implemented functionality of CFG...
Alexander Kornienko [Wed, 20 Jun 2012 21:12:23 +0000 (21:12 +0000)]
Added test with sizeof conditions (relies on to-be-implemented functionality of CFG, discussion: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120507/057370.html)

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

12 years agoReword -Winternal-linkage-in-inline, and rename it to -Wstatic-in-inline.
Jordan Rose [Wed, 20 Jun 2012 21:09:10 +0000 (21:09 +0000)]
Reword -Winternal-linkage-in-inline, and rename it to -Wstatic-in-inline.

Now that this is a C-only warning, we can use "static" instead of "internal
linkage", which is a term developers are probably more familiar with.
This makes for a better warning message. The warning name was changed to match,
since "internal linkage" is not mentioned in the warning text anymore.

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

12 years agoDocumentation cleanup:
James Dennett [Wed, 20 Jun 2012 21:03:59 +0000 (21:03 +0000)]
Documentation cleanup:
* Many fixes for \brief summaries (adding some, and making others shorter);
* Don't try to explicit tell Doxygen a namespace name (and particularly
  don't get it wrong);
* Typo fix: instantitions -> instantiations;
* Slightly more use of \pre for documenting preconditions.

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

12 years ago[analyzer] Do not walk the types for call graph construction.
Anna Zaks [Wed, 20 Jun 2012 20:57:49 +0000 (20:57 +0000)]
[analyzer] Do not walk the types for call graph construction.

Similar to r156661. This should be beneficial performance wise and
hopefully, resolve a RecursiveASTVisitor crash that we are seeing in the
wild, but are incapable of reproducing.

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

12 years ago[analyzer] Malloc: cleanup, disallow free on relinquished memory.
Anna Zaks [Wed, 20 Jun 2012 20:57:46 +0000 (20:57 +0000)]
[analyzer] Malloc: cleanup, disallow free on relinquished memory.

This commits sets the grounds for more aggressive use after free
checking. We will use the Relinquished sate to denote that someone
else is now responsible for releasing the memory.

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

12 years ago[analyzer] Remove dead code.
Anna Zaks [Wed, 20 Jun 2012 20:57:42 +0000 (20:57 +0000)]
[analyzer] Remove dead code.

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

12 years agoDocumentation cleanup: escaping # characters in Doxygen comments.
James Dennett [Wed, 20 Jun 2012 20:49:07 +0000 (20:49 +0000)]
Documentation cleanup: escaping # characters in Doxygen comments.

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

12 years agoRemove unused ASTContext& arg in RawCommentList::addComment, as pointed out by Chandl...
Dmitri Gribenko [Wed, 20 Jun 2012 20:39:04 +0000 (20:39 +0000)]
Remove unused ASTContext& arg in RawCommentList::addComment, as pointed out by Chandler in commit message for r158807.

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

12 years agoAllow unqualified lookup of non-dependent member functions
Nico Weber [Wed, 20 Jun 2012 20:21:42 +0000 (20:21 +0000)]
Allow unqualified lookup of non-dependent member functions
in microsoft mode. Fixes PR12701.

The code for this was already in 2 of the 3 branches of a
conditional and missing in the 3rd branch, so lift it above
the conditional.

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

12 years agoWhitespace.
Chad Rosier [Wed, 20 Jun 2012 18:51:04 +0000 (18:51 +0000)]
Whitespace.

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

12 years agoRemove -Winternal-linkage-in-inline in C++.
Jordan Rose [Wed, 20 Jun 2012 18:50:06 +0000 (18:50 +0000)]
Remove -Winternal-linkage-in-inline in C++.

It's very easy for anonymous external linkage to propagate in C++ through
return types and parameter types. Likewise, it's possible that a template
containing an inline function is only used with parameters that have internal
linkage. Actually diagnosing where the internal linkage comes from is fairly
difficult (both to locate and then to print nicely). Finally, since we only
have one translation unit available, we can't even prove that any of this
violates the ODR.

This warning needs better-defined behavior in C++ before it can really go in.

Rewording of the C warning (which /is/ specified by C99) coming shortly.

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

12 years ago[ms-style asm] Change the fatal error to an extension warning. Apparently, this
Chad Rosier [Wed, 20 Jun 2012 18:28:37 +0000 (18:28 +0000)]
[ms-style asm] Change the fatal error to an extension warning.  Apparently, this
error was asserting on anything that included Windows.h.  MS-style inline asm is
still dropped, but at least now we're not completely silent about it.

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

12 years agoDon't circumvent the debug info type cache when emitting info for EnumConstantDecl.
Benjamin Kramer [Wed, 20 Jun 2012 18:11:18 +0000 (18:11 +0000)]
Don't circumvent the debug info type cache when emitting info for EnumConstantDecl.

CreateEnumType doesn't participate in caching so the descriptor for the enum
gets recomputed for every reference of an element of an enum, only to get
discarded when it gets turned into an MDNode.

No functionality change except performance.

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

12 years agoWhitespace.
Chad Rosier [Wed, 20 Jun 2012 17:43:05 +0000 (17:43 +0000)]
Whitespace.

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

12 years agoobjc: improved diagnostic when property autosynthesis may cause
Fariborz Jahanian [Wed, 20 Jun 2012 17:18:31 +0000 (17:18 +0000)]
objc: improved diagnostic when property autosynthesis may cause
change in behavior. // rdar://11671080

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

12 years agoFix a thinko and a stray debugging hunk in my attributes patch. Thanks to Jordan
Sean Hunt [Wed, 20 Jun 2012 16:05:42 +0000 (16:05 +0000)]
Fix a thinko and a stray debugging hunk in my attributes patch. Thanks to Jordan
Rose and Richard Smith for catching these.

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

12 years agoFix a big layering violation introduced by r158771.
Chandler Carruth [Wed, 20 Jun 2012 09:53:52 +0000 (09:53 +0000)]
Fix a big layering violation introduced by r158771.

That commit added a new library just to hold the RawCommentList. I've
started a discussion on the commit thread about whether that is really
meritted -- it certainly doesn't seem necessary at this stage.

However, the immediate problem is that the AST library has a hard
dependency on the Comment library, but the dependencies were set up
completely backward. In addition to the layering violation, this had an
unfortunate effect if scattering the Comments library dependency
throughout the build system, but inconsistently so -- several parts of
the CMake dependencies were missing and only showed up due to transitive
deps or the fact that the target wasn't being built by tho bots.

It turns out that the Comments library can't (currently) be a well
formed layer *below* the AST library either, as it has an API that
accepts an ASTContext. That parameter is currently unused, so maybe that
was a mistake?

Anyways, it really seems like this is logically part of the AST --
that's the whole point of the ASTContext providing access to it as far
as I can tell -- so I've merged it into the AST library to solve the
immediate layering violation problems and remove some of the churn from
our library dependencies.

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

12 years agoRemove a 'static' specifier from an 'inline' function in a header file.
Chandler Carruth [Wed, 20 Jun 2012 08:43:50 +0000 (08:43 +0000)]
Remove a 'static' specifier from an 'inline' function in a header file.

This issue was caught by the new '-Winternal-linkage-in-inline' warning.

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

12 years agoRevert "Provide a -no-pedantic to cancel out -pedantic." This needs to be designed
Ted Kremenek [Wed, 20 Jun 2012 07:03:37 +0000 (07:03 +0000)]
Revert "Provide a -no-pedantic to cancel out -pedantic."  This needs to be designed
a bit further.  We may wish to just have -Wno flags to silence warnings, and not have a -no-pedantic.

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

12 years agoFix a warning on a fully covered switch with a default:
Chandler Carruth [Wed, 20 Jun 2012 06:47:54 +0000 (06:47 +0000)]
Fix a warning on a fully covered switch with a default:

../tools/clang/lib/Serialization/ASTReader.cpp:6316:9: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]

Also fix the indentation here to match the coding conventions.

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

12 years agoRestructure how the driver communicates information about the
John McCall [Wed, 20 Jun 2012 06:18:46 +0000 (06:18 +0000)]
Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend:  break this
down into a single target runtime kind and version, and compute
all the relevant information from that.  This makes it
relatively painless to add support for new runtimes to the
compiler.  Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime.  This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

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

12 years ago[analyzer] Move failing 'new' test cases back into new.cpp instead of XFAILing.
Jordan Rose [Wed, 20 Jun 2012 05:34:32 +0000 (05:34 +0000)]
[analyzer] Move failing 'new' test cases back into new.cpp instead of XFAILing.

Per Anna's comment, this is a better way to handle "to-do list"-type failures.
This way we'll know if any of the features get fixed; in an XFAIL file, /all/
the cases have to be fixed before lit would tell us anything.

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

12 years ago[arcmt]
Argyrios Kyrtzidis [Wed, 20 Jun 2012 01:46:26 +0000 (01:46 +0000)]
[arcmt]
-Disable -pedantic-errors when migrating per Jordan's suggestion.
-Use llvm_move() per John's suggestion.

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

12 years ago[analyzer] Invalidate placement args; return the pointer given to placement new
Jordan Rose [Wed, 20 Jun 2012 01:32:01 +0000 (01:32 +0000)]
[analyzer] Invalidate placement args; return the pointer given to placement new

The default global placement new just returns the pointer it is given.
Note that other custom 'new' implementations with placement args are not
guaranteed to do this.

In addition, we need to invalidate placement args, since they may be updated by
the allocator function. (Also, right now we don't properly handle the
constructor inside a CXXNewExpr, so we need to invalidate the placement args
just so that callers know something changed!)

This invalidation is not perfect because CallOrObjCMessage doesn't support
CXXNewExpr, and all of our invalidation callbacks expect that if there's no
CallOrObjCMessage, the invalidation is happening manually (e.g. by a direct
assignment) and shouldn't affect checker-specific metadata (like malloc state);
hence the malloc test case in new-fail.cpp. But region values are now
properly invalidated, at least.

The long-term solution to this problem is to rework CallOrObjCMessage into
something more general, rather than the morass of branches it is today.

<rdar://problem/11679031>

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

12 years ago[objcmt] Have the modern objc migration warning change from:
Argyrios Kyrtzidis [Wed, 20 Jun 2012 01:28:32 +0000 (01:28 +0000)]
[objcmt] Have the modern objc migration warning change from:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires a cast

to something like:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires casting 'bool' to 'double'

This is way better to fully understand the warning.
rdar://11705106

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

12 years agoFix cmake build.
Rafael Espindola [Wed, 20 Jun 2012 01:18:08 +0000 (01:18 +0000)]
Fix cmake build.

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