summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Extend -Wdynamic-class-memaccess to records containing dynamic classesReid Kleckner2014-06-27
| | | | | | | | | | Reviewers: rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4325 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211972 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'const' from MemoryBuffers used through the SourceManagerDavid Blaikie2014-06-27
| | | | | | | | | | | | | | This removes a const_cast added in r211884 that occurred due to an inconsistency in how MemoryBuffers are handled between some parts of clang and LLVM. MemoryBuffers are immutable and the general convention in the LLVM project is to omit const from immutable types as it's simply redundant/verbose (see llvm::Type, for example). While this change doesn't remove "const" from /every/ MemoryBuffer, it at least makes this chain of ownership/usage consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211915 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Map /EHs- to -fno-exceptionsReid Kleckner2014-06-27
| | | | | | | | | | | | | | | This isn't 100% compatible with MSVC, but it's close enough. MSVC's /EH flag doesn't really control exceptions so much as how to clean up after an exception is thrown. The upshot is that cl.exe /EHs- will compile try, throw, and catch statements with a warning, but clang-cl will reject such constructs with a hard error. We can't compile such EH constructs anyway, but this may matter to consumers of the AST. Reviewers: hans Differential Revision: http://reviews.llvm.org/D4317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211909 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM-BE] Generate correct NEON intrinsics for big endian systems.James Molloy2014-06-27
| | | | | | | | | | | | | The NEON intrinsics in arm_neon.h are designed to work on vectors "as-if" loaded by (V)LDR. We load vectors "as-if" (V)LD1, so the intrinsics are currently incorrect. This patch adds big-endian versions of the intrinsics that does the "obvious but dumb" thing of reversing all vector inputs and all vector outputs. This will produce extra REVs, but we trust the optimizer to remove them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211893 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Parsing and sema analysis for 'copyprivate' clause.Alexey Bataev2014-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211886 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not inline methods of C++ containers (coming from headers).Anna Zaks2014-06-27
| | | | | | | | | | | | | | | | | | | This silences false positives (leaks, use of uninitialized value) in simple code that uses containers such as std::vector and std::list. The analyzer cannot reason about the internal invariances of those data structures which leads to false positives. Until we come up with a better solution to that problem, let's just not inline the methods of the containers and allow objects to escape whenever such methods are called. This just extends an already existing flag "c++-container-inlining" and applies the heuristic not only to constructors and destructors of the containers, but to all of their methods. We have a bunch of distinct user reports all related to this issue (radar://16058651, radar://16580751, radar://16384286, radar://16795491 [PR19637]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211832 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C ARC. Provide diagnostic and fix-it Fariborz Jahanian2014-06-26
| | | | | | | | | | when casting a retainable object to a objc_bridge_related CF type with the suggestion of applying the method specified in the bridging attribute to the object. // rdar://15932435 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211807 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the -fuse-ld= option.Logan Chien2014-06-26
| | | | | | | | | | | | | | | This commit implements the -fuse-ld= option, so that the user can specify -fuse-ld=bfd to use ld.bfd. This commit re-applies r194328 with some test case changes. It seems that r194328 was breaking macosx or mingw build because clang can't find ld.bfd or ld.gold in the given sysroot. We should use -B to specify the executable search path instead. Patch originally by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211785 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211774 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211767 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some function arguments to use ArrayRef.Craig Topper2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211764 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringLiteralParser constructor to use ArrayRef instead of a pointer ↵Craig Topper2014-06-26
| | | | | | and count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211763 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Improve warnings about uninstrumented files when profilingJustin Bogner2014-06-26
| | | | | | | | | Improve the warning when building with -fprofile-instr-use and a file appears not to have been profiled at all. This keys on whether a function is defined in the main file or not to avoid false negatives when one includes a header with functions that have been profiled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211760 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat RAVs to sync up following recent updatesAlp Toker2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211759 91177308-0d34-0410-b5e6-96231b3b80d8
* RAV: visit copy expressions of captured variables in blocks (ObjC++11)Alp Toker2014-06-26
| | | | | | Patch by Mathieu Baudet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211758 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -Wincomplete-umbrella go through the VFSBen Langmuir2014-06-25
| | | | | | | By using vfs::recursive_directory_iterator, this warning will now fire when some or all of a module's headers are from VFS mappings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211746 91177308-0d34-0410-b5e6-96231b3b80d8
* fixed typos in commentSanjay Patel2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211734 91177308-0d34-0410-b5e6-96231b3b80d8
* Add vfs::recursive_directory_iteratorBen Langmuir2014-06-25
| | | | | | | | | For now, this is only used by its unit tests. It is similar to the API in llvm::sys::fs::recursive_directory_iterator, but without some of the more complex features like requesting that the iterator not recurse into the next directory, for example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211732 91177308-0d34-0410-b5e6-96231b3b80d8
* MS ABI: Propagate class-level DLL attributes to class template ↵Hans Wennborg2014-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | specialization bases (PR11170) Consider the following code: template <typename T> class Base {}; class __declspec(dllexport) class Derived : public Base<int> {} When the base of an exported or imported class is a class template specialization, MSVC will propagate the dll attribute to the base. In the example code, Base<int> becomes a dllexported class. This commit makes Clang do the proopagation when the base hasn't been instantiated yet, and warns about it being unsupported otherwise. This is different from MSVC, which allows changing a specialization back and forth between dllimport and dllexport and seems to let the last one win. Changing the dll attribute after instantiation would be hard for us, and doesn't seem to come up in practice, so I think this is a reasonable limitation to have. MinGW doesn't do this kind of propagation. Differential Revision: http://reviews.llvm.org/D4264 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211725 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing the RST markup for the #pragma loop attribute documentation.Aaron Ballman2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211693 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch32] Fix a stupid error in an architectural guardJames Molloy2014-06-25
| | | | | | | | The < 8 instead of <= 8 meant that a bunch of vreinterprets were not available on v8 AArch32. Simplify the guard to just !defined(aarch64) while we're at it, and enable some v8 AArch32 testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211686 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'sections' directive.Alexey Bataev2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211685 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] OMPSimdDirective and OMPForDirective: added initialization for ↵Alexey Bataev2014-06-25
| | | | | | CollapsedNum member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211672 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improved code and replaced struct by lambda.Alexey Bataev2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211660 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement predefined stdint macrosJF Bastien2014-06-25
| | | | | | | | | | | | | Add predefined stdint macros that match the given patterns: U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE} U?INT{PTR,MAX}_{MAX,TYPE} http://reviews.llvm.org/D4141 Author: binji git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211657 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a better diagnostic when braces are put before the identifier.Richard Trieu2014-06-24
| | | | | | | | | | | | | | | | | | When a user types: int [4] foo; assume that the user means: int foo[4]; Update the information for 'foo' to prevent additional errors, and provide a fix-it hint to move the brackets to the correct location. Additionally, suggest parens for types that require it, such as: int [4] *foo; to: int (*foo)[4]; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211641 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test issues from r211623 and remove test-only APIBen Langmuir2014-06-24
| | | | | | | | | | | 1) missing iterator bits needed by libstdc++4.7 Using find_if was convenient, but since operator++ wasn't a good interface anyway, I just replaced with a range-based for loop and removed operator++ from the directory_iterator class. 2) stop relying on order of iterating real files git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211633 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot to add file in r211631Matt Arsenault2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211632 91177308-0d34-0410-b5e6-96231b3b80d8
* Add R600 builtin codegen.Matt Arsenault2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211631 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing C++ mode commentMatt Arsenault2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211630 91177308-0d34-0410-b5e6-96231b3b80d8
* Add directory_iterator for (non-recursive) iteration of VFS directoriesBen Langmuir2014-06-24
| | | | | | | | The API is based on sys::fs::directory_iterator, but it allows iterating over overlays and the yaml-based VFS. For now, it isn't used by anything (except its tests). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211623 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C. When we use @selector(save:), etc. there may be more Fariborz Jahanian2014-06-24
| | | | | | | | | | | | | | than one method with mismatched type of same selector name. clang issues a warning to point this out since it may cause undefined behavior. There are cases though that some APIs don't care about user methods and such warnings are perceived as noise. This patch allows users to add paren delimiters around selector name to turn off such warnings. So, @selector((save:)) will turn off the warning. It also provides 'fixit' so user knows what to do. // rdar://16458579 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211611 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new debug kind LocTrackingOnly.Diego Novillo2014-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This new debug emission kind supports emitting line location information in all instructions, but stops code generation from emitting debug info to the final output. This mode is useful when the backend wants to track source locations during code generation, but it does not want to produce debug info. This is currently used by optimization remarks (-Rpass, -Rpass-missed and -Rpass-analysis). When one of the -Rpass flags is used, the front end will enable location tracking, only if no other debug option is enabled. To prevent debug information from being generated, a new debug info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to not emit the llvm.dbg.cu annotation. This blocks final code generation from generating debug info in the back end. Depends on D4234. Reviewers: echristo, dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4235 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211610 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Additional checking for 'collapse' clause.Alexey Bataev2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211589 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Added initial checking of nesting of OpenMP regions.Alexey Bataev2014-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211566 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate isAddressOfMember into typo correction so that we don't correct ↵Nick Lewycky2014-06-23
| | | | | | &qualified-id into &unqualified-id. Also make sure to set the naming class when we find the qualified-id in a different class than the nested name specifier specified so far. Fixes PR19681! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211551 91177308-0d34-0410-b5e6-96231b3b80d8
* AST: Add ranges for AsmStmt's inputs and outputsDavid Majnemer2014-06-23
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211483 91177308-0d34-0410-b5e6-96231b3b80d8
* DiagnosticIDs: use diagnostic severities to simplify extension handlingAlp Toker2014-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211479 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the category name for hash-warnings and hash-errorsAlp Toker2014-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211475 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused diagnostic and diagnostic group.Benjamin Kramer2014-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211464 91177308-0d34-0410-b5e6-96231b3b80d8
* TextDiagnosticPrinter: use the mapped level for remark flag computationAlp Toker2014-06-22
| | | | | | | | | Custom diagnostics don't have a builtin class so this wouldn't have worked. Reduces surface area of remark-related changes. No test coverage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211462 91177308-0d34-0410-b5e6-96231b3b80d8
* DiagnosticRenderer: emit basic notes as real diagnosticsAlp Toker2014-06-21
| | | | | | | Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear when using emitBasicNote(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211448 91177308-0d34-0410-b5e6-96231b3b80d8
* TextDiagnostic: print remark level diagnostics in bold tooAlp Toker2014-06-21
| | | | | | | | | | | The purpose of bolding these is to make them visually distinct from continuations (supplemental note diagnostics). Therefore, the bolding applies to all severities _including_ remarks -- it's not in any way an indicator of priority. Also simplify and comment. No tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211447 91177308-0d34-0410-b5e6-96231b3b80d8
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-21
| | | | | | | | | | | | | | | | Something went wrong with r211426, it is an older version of this code and should not have been committed. It was reverted with r211434. Original commit message: We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211441 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Lex: Use the correct types for MS integer suffixes"Rafael Espindola2014-06-21
| | | | | | | | | This reverts commit r211426. This broke the arm bots. The crash can be reproduced on X86 by running. ./bin/clang -cc1 -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211434 91177308-0d34-0410-b5e6-96231b3b80d8
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-21
| | | | | | | | | | | | We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211426 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Record that we're in crashdump and push flags to ConstructJobJustin Bogner2014-06-20
| | | | | | | | | | | It's more flexible and arguably better layering to set flags to modify compiling for diagnostics in the CC1 job themselves, rather than tweaking the driver flags and letting them propagate. There is one visible change this causes: crash report files will now get preprocessed names (.i and friends). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211411 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++1z] Implement N3928: message in static_assert is optional.Richard Smith2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211394 91177308-0d34-0410-b5e6-96231b3b80d8
* The ability to use vector initializer lists is a GNU vector extensionJames Molloy2014-06-20
| | | | | | | | | | | | | | | | | | | | | | and is unrelated to the NEON intrinsics in arm_neon.h. On little endian machines it works fine, however on big endian machines it exhibits surprising behaviour: uint32x2_t x = {42, 64}; return vget_lane_u32(x, 0); // Will return 64. Because of this, explicitly call out that it is unsupported on big endian machines. This patch will emit the following warning in big-endian mode: test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu] int32x4_t x = {0, 1, 2, 3}; ^ test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants 1 warning generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211362 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211352 91177308-0d34-0410-b5e6-96231b3b80d8