Commit Graph

16461 Commits

Author SHA1 Message Date
Aaron Ballman b105e49f28 [C++11] Replacing iterators ddiag_begin() and ddiag_end() with iterator_range ddiags(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203240
2014-03-07 14:09:15 +00:00
Aaron Ballman 63ab760ebe [C++11] Updating getUsingDirectives to use iterator_range instead of a std::pair.
llvm-svn: 203239
2014-03-07 13:44:44 +00:00
Aaron Ballman 7dce1a840c Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.
llvm-svn: 203237
2014-03-07 13:13:38 +00:00
Aaron Ballman 690829696c [C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203236
2014-03-07 12:50:00 +00:00
Argyrios Kyrtzidis e1974dcd92 [Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is TU_Prefix
avoid warning for unused macros.

rdar://15034698

llvm-svn: 203213
2014-03-07 07:47:58 +00:00
Ben Langmuir 198c168518 Add a bunch of missing changes from r203208
Somehow lost these in a git operation.

llvm-svn: 203210
2014-03-07 07:27:49 +00:00
Ben Langmuir cb69b57b2a Add dependencies from imported modules with -MD
Add module dependencies to the dependency files created by -MD/-MMD/etc.
by attaching an ASTReaderListener that will call into the dependency
file generator when a module input file is seen in the serialized AST.

llvm-svn: 203208
2014-03-07 06:40:32 +00:00
Aaron Ballman 211cd8ccb7 Partial revert of r203179. The build bots are telling me that some out-of-tree builds are using redecls_begin()/redecls_end(), so adding some machinery back in to support them.
llvm-svn: 203182
2014-03-07 00:10:58 +00:00
Aaron Ballman 86c9390673 [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely.
llvm-svn: 203179
2014-03-06 23:45:36 +00:00
Alexander Kornienko a74979d66f Added an inserter for ArrayRef<SourceRange>.
Summary:
Added an inserter for ArrayRef<SourceRange>, as it is already needed in at least
two places (static analyzer and clang-tidy).

Reviewers: jordan_rose

CC: cfe-commits, gribozavr

Differential Revision: http://llvm-reviews.chandlerc.com/D2984

llvm-svn: 203117
2014-03-06 13:23:30 +00:00
Alexey Bataev 568a833f68 [OPENMP] Clause 'num_threads'
llvm-svn: 203087
2014-03-06 06:15:19 +00:00
Alexey Bataev 186b28a8cf [OPENMP] Added option -fopenmp=libiomp5|libgomp
llvm-svn: 203081
2014-03-06 05:43:53 +00:00
Richard Smith faf156ad15 Tests for DR370-380.
Also promote a couple of Warnings on ill-formed code found by this testing to
ExtWarns.

llvm-svn: 203021
2014-03-05 22:54:58 +00:00
Aaron Ballman 6c8100748f Capabilities are required to pass a name specifying what type of capability is being annotated. There are currently only two supported names: mutex and role. Adding functionality to check for the capability name and diagnose when it's unexpected.
Note that for backwards compatibility, an unnamed capability will default to being a "mutex." This allows the deprecated lockable attribute to continue to function.

llvm-svn: 203012
2014-03-05 21:47:13 +00:00
David Majnemer f27217ffaf AST: Remove layering violation with Sema
Scope lives in Sema and cannot be used in AST. Shuffle things around.

llvm-svn: 202993
2014-03-05 18:55:38 +00:00
Ben Langmuir 53145df884 Use ThreadSafeRefCountedBase for vfs::FileSystem
Allow trivial read-only filesystems such as RealFileSystem to be shared
between threads.

llvm-svn: 202986
2014-03-05 15:25:59 +00:00
Alexander Kornienko cef10edcb2 Added a const qualifier to SourceManager& parameters.
llvm-svn: 202964
2014-03-05 10:38:27 +00:00
David Majnemer 2206bf5d5b [-cxx-abi microsoft] Implement local manglings accurately
Summary:
The MSVC ABI appears to mangle the lexical scope into the names of
statics.  Specifically, a counter is incremented whenever a scope is
entered where things can be declared in such a way that an ambiguity can
arise.  For example, a class scope inside of a class scope doesn't do
anything interesting because the nested class cannot collide with
another nested class.

There are problems with this scheme:
- It is unreliable. The counter is only incremented when a previously
  never encountered scope is entered.  There are cases where this will
  cause ambiguity amongst declarations that have the same name where one
  was introduced in a deep scope while the other was introduced right
  after in the previous lexical scope.
- It is wasteful.  Statements like: {{{{{{{ static int foo = a; }}}}}}}
  will make the mangling of "foo" larger than it need be because the
  scope counter has been incremented many times.

Because of these problems, and practical implementation concerns.  We
choose not to implement this scheme if the local static or local type
isn't visible.  The mangling of these declarations will look very
similar but the numbering will make far more sense, this scheme is
lifted from the Itanium ABI implementation.

Reviewers: rsmith, doug.gregor, rnk, eli.friedman, cdavis5x

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2953

llvm-svn: 202951
2014-03-05 08:57:59 +00:00
Alexey Bataev 2759a7c9c0 [OPENMP] allow clause 'private' on directive 'omp simd'
llvm-svn: 202944
2014-03-05 07:21:14 +00:00
David Majnemer 75991301d2 TokenKinds: _Atomic isn't a keyword in MS mode
Summary:
This is needed to allow MSVC's <atomic> header to properly parse.
It uses _Atomic as a class-id.

Reviewers: rnk

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2948

llvm-svn: 202901
2014-03-04 22:07:09 +00:00
Benjamin Kramer cfcdd23339 Revert "FileEntry: Remove unused and half-broken copy ctor."
Looks like libstdc++ 4.7 still needs it.

llvm-svn: 202896
2014-03-04 21:49:45 +00:00
Benjamin Kramer 5bc79bfc10 [C++11] Push move semantics through APValue.
llvm-svn: 202894
2014-03-04 21:47:57 +00:00
Benjamin Kramer 4bd1ffa3ee FileEntry: Remove unused and half-broken copy ctor.
llvm-svn: 202893
2014-03-04 21:47:50 +00:00
Benjamin Kramer 9299637dc0 Pass llvm::Triple objects by const reference.
Copying isn't cheap as it contains a std::string.

llvm-svn: 202880
2014-03-04 19:31:42 +00:00
Benjamin Kramer b99c6b5d94 [C++11] Make StoredDeclsList move-only.
It is only moved when a StoredDeclsMap grows.

llvm-svn: 202859
2014-03-04 16:42:46 +00:00
Chandler Carruth 757fcd6d1f [cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
a missing include from CLog.h.

CLog.h referenced most of the core libclang types but never directly
included Index.h that provides them. Previously it got lucky and other
headers were always included first but with the sorting it ended up
first in one case and stopped compiling. Adding the Index.h include
fixes it right up.

llvm-svn: 202810
2014-03-04 10:05:20 +00:00
Hans Wennborg 04110bfb77 Include <tuple> to speculatively try to fix VS2013 build after r202755
llvm-svn: 202765
2014-03-03 22:25:31 +00:00
Richard Smith 446161b9ac Improve diagnostics for malformed constructor declarations (where lookup for
the type of the first parameter fails, and it is the only, unnamed, parameter).

llvm-svn: 202759
2014-03-03 21:12:53 +00:00
Benjamin Kramer 5367356a64 [C++11] Add missing include.
llvm-svn: 202757
2014-03-03 20:39:28 +00:00
Benjamin Kramer a741b8c451 [C++11] Simplify compare operators with std::tie.
No functionality change.

llvm-svn: 202755
2014-03-03 20:26:46 +00:00
Aaron Ballman f08a5c7608 I guess we're still using LLVM_DELETED_FUNCTION instead of = delete. This should fix a complaining built bot.
llvm-svn: 202734
2014-03-03 18:41:48 +00:00
Jordan Rose 7ef1c387a0 Serialized diagnostic severity levels should be stable.
Serialized diagnostics were accidentally using the AST diagnostic level values
rather than a dedicated stable enum, so the addition of "remark" broke the
reading of existing serialized diagnostics files. I've added a .dia file
generated from Xcode 5's Clang to make sure we don't break this in the future.

llvm-svn: 202733
2014-03-03 18:29:52 +00:00
Aaron Ballman 3efb895bb1 Removing some unused functionality.
llvm-svn: 202727
2014-03-03 16:21:37 +00:00
Argyrios Kyrtzidis 1594c15500 Introduce '-fmodules-user-build-path' which accepts the "canonical" path to a user workspace build.
This is used to avoid conflicts with user modules with the same name from different workspaces.

rdar://16042513

llvm-svn: 202683
2014-03-03 08:12:05 +00:00
Argyrios Kyrtzidis d502a10c5e [libclang] Introduce APIs that assist in constructing a simple module.map file for a user framework.
rdar://16092858

llvm-svn: 202681
2014-03-03 07:41:45 +00:00
Ahmed Charles bf8e283f15 [C++11] Add #include's for OwningPtr.
Allows removing #include's in LLVM while switching to std::unique_ptr.

llvm-svn: 202677
2014-03-03 07:11:21 +00:00
Argyrios Kyrtzidis 74c96c0c75 [libclang] Change clang_VirtualFileOverlay_writeToBuffer to return a malloc'ed buffer.
Returning CXString is not appropriate if we want to switch to a non-string format buffer.

llvm-svn: 202675
2014-03-03 06:38:52 +00:00
David Majnemer b100410365 Normalize line endings
Some files had CRLF line terminators, some only had a mixture of
CRLF and LF.  Switch to LF.

llvm-svn: 202659
2014-03-02 18:46:05 +00:00
Aaron Ballman b576a36c88 Adding some cross references to the sanitizer attribute documentation. Removes a Sphinx warning pointed out by Sean Silva.
llvm-svn: 202655
2014-03-02 17:48:20 +00:00
Benjamin Kramer bd39f6e364 [C++11] ASTMatchers: Use standard static_assert and type traits.
llvm-svn: 202653
2014-03-02 17:08:43 +00:00
Benjamin Kramer cef536ec0f [C++11] Work around an incompatibility between llvm::tie and std::tie.
llvm-svn: 202643
2014-03-02 13:18:22 +00:00
Chandler Carruth 06dde92cd6 [C++11] Switch from LLVM_STATIC_ASSERT to static_assert now that we
require host toolchains which support this.

llvm-svn: 202640
2014-03-02 13:02:01 +00:00
Benjamin Kramer 867ea1d426 [C++11] Replace llvm::tie with std::tie.
llvm-svn: 202639
2014-03-02 13:01:17 +00:00
Craig Topper a798a9db93 Switch all uses of LLVM_OVERRIDE to just use 'override' directly.
llvm-svn: 202625
2014-03-02 09:32:10 +00:00
Richard Smith 7794486846 Add [extern_c] attribute for modules, allowing a C module to be imported within an extern "C" block in C++ code.
llvm-svn: 202615
2014-03-02 05:58:18 +00:00
Chandler Carruth c72d9b33af [C++11] Switch from the llvm_move macro to directly calling std::move.
llvm-svn: 202611
2014-03-02 04:02:40 +00:00
Alp Toker ceb95c47c4 [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro
llvm-svn: 202606
2014-03-02 03:20:16 +00:00
Alp Toker 7d659c8563 [C++11] Drop legacy conditionals for TokenKind's underlying type
This relies on forward declaration of enums.

llvm-svn: 202605
2014-03-02 02:26:52 +00:00
NAKAMURA Takumi 390ad0db26 ASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]
FIXME: Give appropriate \param to llvm::ArrayRef<SubmoduleID> Overrides.
llvm-svn: 202589
2014-03-01 12:49:14 +00:00
Chandler Carruth c0b91adf84 [C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macro
is now always 1, as we're requiring C++11 now!

llvm-svn: 202584
2014-03-01 09:40:34 +00:00
Richard Smith 49f906a36f If a module A exports a macro M, and a module B imports that macro and #undef's
it, importers of B should not see the macro. This is complicated by the fact
that A's macro could also be visible through a different path. The rules (as
hashed out on cfe-commits) are included as a documentation update in this
change.

With this, the number of regressions in libc++'s testsuite when modules are
enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are
due to remaining bugs in this change (in particular, the handling of submodules
is imperfect).

llvm-svn: 202560
2014-03-01 00:08:04 +00:00
Ben Langmuir d066d4c849 Reapply fixed "Honour 'use-external-names' in FileManager"
Was r202442

There were two issues with the original patch that have now been fixed.
1. We were memset'ing over a FileEntry in a test case. After adding a
   std::string to FileEntry, this still happened to not break for me.
2. I didn't pass the FileManager into the new compiler instance in
   compileModule. This was hidden in some cases by the fact I didn't
   clear the module cache in the test.

Also, I changed the copy constructor for FileEntry, which was memcpy'ing
in a (now) unsafe way.

llvm-svn: 202539
2014-02-28 21:16:07 +00:00
Kaelyn Uhrain b4b1475322 Don't suggest non-static methods as corrections when they obviously
won't work (i.e. when not doing a member lookup and not in a method from
the same class or a descendant class).

llvm-svn: 202520
2014-02-28 18:12:42 +00:00
Aaron Ballman 6fe42c9ea5 Removing some unused functionality.
llvm-svn: 202519
2014-02-28 18:04:53 +00:00
Benjamin Kramer 0e4bc4b352 CFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.
PR18999.

llvm-svn: 202491
2014-02-28 11:12:22 +00:00
Tobias Grosser 741602461d Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

llvm-svn: 202475
2014-02-28 09:11:08 +00:00
Argyrios Kyrtzidis 24c55228a9 [ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that created them,
this is inherently unsafe.

Instead get the diagnostic info into a SourceManager-independent form.

llvm-svn: 202471
2014-02-28 07:11:01 +00:00
Richard Smith 2868a736f8 Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:
const char *format = "%s";
  std::experimental::string_view view = "foo";
  printf(format, view);

In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.

llvm-svn: 202461
2014-02-28 01:36:39 +00:00
Hal Finkel 00a950f488 Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature
The backend currently enables CR-bit tracking by default at -O2 and higher.
These flags allow the user to override that default.

llvm-svn: 202453
2014-02-28 00:27:57 +00:00
Ben Langmuir 1b8d44f59b Revert "Honour 'use-external-names' in FileManager"
Revert r202442, which broke the buildbots.

llvm-svn: 202443
2014-02-27 23:48:03 +00:00
Ben Langmuir 09e0d5c1bb Honour 'use-external-names' in FileManager
Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.

llvm-svn: 202442
2014-02-27 23:27:54 +00:00
Reid Kleckner d6f9b83ae1 MS ABI: Attempt to fix DenseMap entry reference invalidation
llvm-svn: 202441
2014-02-27 22:51:43 +00:00
Ben Langmuir c9b7234e5c Reapply r202420 hopefully fixed for other STLs
Keep the copy constructor around, and add a FIXME that we should really
remove it as soon as we have C++11 std::map's emplace function.

llvm-svn: 202439
2014-02-27 22:21:32 +00:00
John McCall 95833f33bd Diagnose attempts to apply ms_struct to records with base classes
or virtual functions, but permit that error to be downgraded to
a warning (with -Wno-error=incompatible-ms-struct), and officially
support this kind of dual, ABI-mixing layout.

The basic problem here is that projects which use ms_struct are often
not very circumspect about what types they annotate; for example,
some projects enable the pragma in a prefix header and then only
selectively disable it around system header inclusions.  They may
only care about binary compatibility with MSVC for a subset of
those structs, but that doesn't mean they have no binary
compatibility concerns at all for the rest; thus we are essentially
forced into supporting this hybrid ABI.  But it's reasonable for
us to at least point out the places where we're not making
any guarantees.

The original diagnostic was for dynamic classes, i.e. those with
virtual functions or virtual bases; I've extended it to include
all classes with bases, because we are not actually making any
attempt to duplicate MSVC's base subobject layout in ms_struct
(and it is indeed quite different from Itanium, even for
non-virtual bases).

rdar://16178895

llvm-svn: 202427
2014-02-27 20:30:49 +00:00
Reid Kleckner 9c6e9e313d MS ABI: Fix vftable mangling by using the vbtable name algorithm
Summary:
This merges VFPtrInfo and VBTableInfo into VPtrInfo, since they hold
almost the same information.  With that change, the vbtable mangling
code can easily be applied to vftable data and we magically get the
correct, unambiguous vftable names.

Fixes PR17748.

Reviewers: timurrrr, majnemer

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2893

llvm-svn: 202425
2014-02-27 19:40:09 +00:00
Ben Langmuir 90292a57fc Revert "Remove constructors from FileEntry that prevent owning resources"
This reverts commit r202420, which broke the build.

llvm-svn: 202421
2014-02-27 19:20:35 +00:00
Ben Langmuir e2db0cb07b Remove constructors from FileEntry that prevent owning resources
This cleans up some constructors that would not be safe once FileEntry
owns the storage for its name. These were already suspect, since they
wouldn't work if the FileEntry had an open file descriptor. The only
user for these constructors was in UniqueFileContainer, which wasn't a
very useful abstraction anyway. So it and UniqueDirContainer have been
replaced with std::map<UniqueID, *>.

This change should not affect anything outside the FileManager.

llvm-svn: 202420
2014-02-27 19:14:03 +00:00
Ben Langmuir c8a71468b7 Split FileEntry name vs. isValid
This is a small bit of refactoring in preparation for FileEntry owning
the storage for its own name.

llvm-svn: 202412
2014-02-27 17:23:33 +00:00
Dmitri Gribenko 6ede6aba28 libclang: New functions clang_Type_getNumTemplateArguments,
clang_Type_getTemplateArgument

Note that these functions don't handle variadic templates -- see tests.

Patch by Matthieu Nottale and Philippe Daouadi.

llvm-svn: 202406
2014-02-27 16:05:05 +00:00
Alexey Bataev 1b59ab5683 [OPENMP] First changes for Parsing and Sema for 'omp simd' directive support
llvm-svn: 202360
2014-02-27 08:29:12 +00:00
Argyrios Kyrtzidis 1b7ed91e44 [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().
With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs that have been disposed.

Fix this by having the CompilerInstance object keep a reference to the ASTReader
as well as having the ASTContext keep reference to the ExternalASTSource.

This was very difficult to construct a test case for.
rdar://16149782

llvm-svn: 202346
2014-02-27 04:11:59 +00:00
Ben Langmuir b59cf679e8 Add a 'use-external-names' option to VFS overlay files
When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).

The setting is available globally, but can be overriden on a per-file
basis.

The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.

llvm-svn: 202329
2014-02-27 00:25:12 +00:00
Ted Kremenek 4b6fee6cc4 Rework CFG edges to encode potentially unreachable edges, instead of just making them NULL.
This is to support some analyses, like -Wunreachable-code, that
will need to recover the original unprunned CFG edges in order
to suppress issues that aren't really bugs in practice.

There are two important changes here:

- AdjacentBlock replaces CFGBlock* for CFG successors/predecessors.
  This has the size of 2 pointers, instead of 1.  This is unlikely
  to have a significant memory impact on Sema since a single
  CFG usually exists at one time, but could impact the memory
  usage of the static analyzer.  This could possibly be optimized
  down to a single pointer with some cleverness.

- Predecessors can now contain null predecessors, which means
  some analyses doing a reverse traversal will need to take into
  account.  This already exists for successors, which contain
  successor slots for specific branch kinds (e.g., 'if') that
  expect a fixed number of successors, even if a branch is
  not reachable.

llvm-svn: 202325
2014-02-27 00:24:00 +00:00
Alp Toker c535072d0d argument -> parameter terminology fixes for FunctionTypeInfo
This is a continuation of r199686.

llvm-svn: 202307
2014-02-26 22:27:52 +00:00
Nico Rieck 8e9791f62c Sema: Definition of dllimport globals is not allowed
Upgrades the warning to an error and clarifies the message by treating the
definition as error instead of the attribute.

llvm-svn: 202300
2014-02-26 21:27:13 +00:00
Richard Trieu 3bb8b56a5d PR16074, implement warnings to catch pointer to boolean true and pointer to
null comparison when the pointer is known to be non-null.

This catches the array to pointer decay, function to pointer decay and
address of variables.  This does not catch address of function since this
has been previously used to silence a warning.

Pointer to bool conversion is under -Wbool-conversion.
Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group
of -Wtautological-compare.

void foo() {
  int arr[5];
  int x;
  // warn on these conditionals
  if (foo);
  if (arr);
  if (&x);
  if (foo == null);
  if (arr == null);
  if (&x == null);

  if (&foo);  // no warning
}

llvm-svn: 202216
2014-02-26 02:36:06 +00:00
Richard Trieu 7eb0b2c181 Add -Wabsolute-value, warnings about absolute value functions.
The warnings fall into three groups.
1) Using an absolute value function of the wrong type, for instance, using the
int absolute value function when the argument is a floating point type.
2) Using the improper sized absolute value function, for instance, using abs
when the argument is a long long.  llabs should be used instead.

From these two cases, an implicit conversion will occur which may cause
unexpected behavior.  Where possible, suggest the proper absolute value
function to use, and which header to include if the function is not available.

3) Taking the absolute value of an unsigned value.  In addition to this warning,
suggest to remove the function call.  This usually indicates a logic error
since the programmer assumed negative values would have been possible.

llvm-svn: 202211
2014-02-26 01:17:28 +00:00
Ben Langmuir 801272a98c Add a driver option -ivfsoverlay
Reads the description of a virtual filesystem from a file and overlays
it over the real file system.

llvm-svn: 202176
2014-02-25 18:23:47 +00:00
Tim Northover 2df47cedeb AArch64: use different type modifier in arm_neon.td
The 'f' modifier is designed for integer type arguments really (according to
its documentation). It's better to use the "half width, same number" modifier.

Should be no user-visible change.

llvm-svn: 202152
2014-02-25 13:53:01 +00:00
Serge Pavlov 103435e89c Fix typo.
llvm-svn: 202142
2014-02-25 11:32:34 +00:00
Alexey Bataev 1319381686 Fix for Bug 18536 - Bad alignment in clang/AST/StmpOpenMP.h
llvm-svn: 202141
2014-02-25 11:25:38 +00:00
Tim Northover 3d4575cc1b AArch64 NEON: add 64-bit scalar intrinsics for _f64 mla/mls etc.
These seem to be supported by GCC, and do make sense architecturally so we
should probably have them.

llvm-svn: 202138
2014-02-25 11:13:49 +00:00
Tim Northover 87da936164 ARM NEON: add _f16 support to a couple of vector-shuffling intrinsics.
llvm-svn: 202137
2014-02-25 11:13:42 +00:00
David Majnemer 67e541e1c8 Attr: Remove ForceInline
The __forceinline keyword's semantics are now recast as AlwaysInline and
the kw___forceinline token has its language mode set for KEYMS.

This preserves the semantics of the previous implementation but with
less duplication of code.

llvm-svn: 202131
2014-02-25 09:53:29 +00:00
David Majnemer ae88b72ac8 AttributeReference: Document __single_inhertiance, __multiple_inheritance, __virtual_inheritance
Add documentation for these attributes, it includes:
- Motivation for their existence.
- Examples on how to use them.
- Examples on how to misuse them.

llvm-svn: 202121
2014-02-25 08:28:55 +00:00
Alp Toker ba7eab09d6 Fix typo in the td source too
r202112 fixed the generated output which will hopefully go away soon.

llvm-svn: 202116
2014-02-25 06:02:42 +00:00
Ted Kremenek bce562be03 Remove the FormatSecurity diagnostic group from the FormatNonLiteral warning group.
The FormatSecurity warning group does not need to be a sub-group
of the FormatNonLiteral group.

Patch by Zach Davis!

llvm-svn: 202114
2014-02-25 05:42:31 +00:00
Alp Toker f45fa3dca5 Fix typos
llvm-svn: 202108
2014-02-25 04:21:44 +00:00
Argyrios Kyrtzidis 0b9682efa4 [libclang] Introduce libclang APIs for creating a buffer with a JSON virtual file overlay description.
The current API only supports adding 'virtual file path' -> 'real file path' mappings.

rdar://15986708

llvm-svn: 202105
2014-02-25 03:59:23 +00:00
Argyrios Kyrtzidis 09a439d313 [libclang] Include "BuildSystem.h" along with "Index.h"
llvm-svn: 202104
2014-02-25 03:59:16 +00:00
David Majnemer 5090d9a732 AST: Simplify CharUnits::alignmentAtOffset
CharUnits::alignmentAtOffset is equivalent to llvm::MinAlign but
slightly less efficient.  Use it's implementation instead.

llvm-svn: 202099
2014-02-25 01:47:33 +00:00
Reid Kleckner fab1e89de9 MS ABI: Return sret parameters when using inalloca
Previously the X86 backend would look for the sret attribute and handle
this for us.  inalloca takes that all away, so we have to do the return
ourselves now.

llvm-svn: 202097
2014-02-25 00:59:14 +00:00
Ben Langmuir 97882e7b7f Pass through context for DiagHandler in VFS
This allows the unit tests to not use global state when checking
diagnostics.

llvm-svn: 202072
2014-02-24 20:56:37 +00:00
Peter Collingbourne dec2c8657e Follow up to r201927: remove the Sema::InFunctionDeclarator field.
llvm-svn: 202069
2014-02-24 20:45:14 +00:00
Richard Barton c9b5f35ec1 Implement -fno-short-wchar
llvm-svn: 202058
2014-02-24 18:43:28 +00:00
Hans Wennborg 3d79154aec [Win32 ABI] Defer operator delete checks until vtable is marked used
We were previously checking at every destructor declaration, but that was a bit
excessive. Since the deleting destructor is emitted with the vtable, do the
check when the vtable is marked used.

Differential Revision: http://llvm-reviews.chandlerc.com/D2851

llvm-svn: 202046
2014-02-24 15:58:24 +00:00
Aaron Ballman c523dcff29 Clarifying the wording for the noduplicate attribute.
Patch by Marcello Maggioni!

llvm-svn: 202035
2014-02-24 13:46:15 +00:00
Manuel Klimek 4f8f890ade Fix docs generation for the AST matchers:
1. Move internal functions into ASTMatchersInternal.
2. Adapt dump_ast_matchers.py to the new VariadicOperatorMatcherFunc
   signature.
3. Update the actual docs with the updated tool / code.

llvm-svn: 202017
2014-02-24 10:28:36 +00:00
Dmitri Gribenko 51c1b55bc2 ASTMatchers: added CXXMethodDecl matcher isPure()
The isPure() CXXMethodDecl matcher matches pure method declaration like "A::x"
in this example:

class A {
  virtual void x() = 0;
}

Patch by Konrad Kleine.

llvm-svn: 202012
2014-02-24 09:27:46 +00:00
Kevin Qin ad64f6d4e5 [AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.
Most 64-bit targets define int64_t as long int, and AArch64 should
make same definition to follow LP64 model. In GNU tool chain, int64_t
is defined as long int for 64-bit target. So to get consistent with GNU,
it's better Changing int64_t from 'long long int' to 'long int',
otherwise clang will get different name mangling suffix compared with g++.

llvm-svn: 202004
2014-02-24 02:45:03 +00:00