summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* 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
* OMPScheduleClause::OMPScheduleClause(): Fix possible typos, ↵NAKAMURA Takumi2014-06-20
| | | | | | s/\brief/\param/g. [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211348 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211347 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211342 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid invalidating successfully loaded module filesBen Langmuir2014-06-20
| | | | | | | | | | | | | | | | | Successfully loaded module files may be referenced in other ModuleManagers, so don't invalidate them. Two related things are fixed: 1) I thought the last module in the manager was always the one that failed, but it isn't. So check explicitly against the list of vetted modules from ReadASTCore. 2) We now keep the file descriptor of pcm file open, which avoids the possibility of having two different pcms for the same module loaded when building in parallel with headers being modified during a build. <rdar://problem/16835846> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211330 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C qoi. When Objective-C pointer mismatches withFariborz Jahanian2014-06-19
| | | | | | | | | a qualified-id type because pointer is object of a forward class declaration, include this info in a diagnostic note. // rdar://10751015 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211324 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Add a CC1 flag to dump module dependencies to a directoryJustin Bogner2014-06-19
| | | | | | | | | | | | | | | | | | This adds the -module-dependency-dir to clang -cc1, which specifies a directory to copy all of a module's dependencies into in a form suitable to be used as a VFS using -ivfsoverlay with the generated vfs.yaml. This is useful for crashdumps that involve modules, so that the module dependencies will be intact when a crash report script is used to reproduce a problem on another machine. We currently encode the absolute path to the dump directory, due to limitations in the VFS system. Until we can handle relative paths in the VFS, users of the VFS map may need to run a simple search and replace in the file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211303 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR20069: bad loop pragma arguments crash FEEli Bendersky2014-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a crash when handling malformed arguments to loop pragmas such as: "#pragma clang loop vectorize(()". Essentially any argument which is not an identifier or constant resulted in a crash. This patch also changes a couple of the error messages which weren't quite correct. New behavior with this patch vs old behavior: #pragma clang loop vectorize(1) OLD: error: missing keyword; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' #pragma clang loop vectorize() OLD: error: expected ')' NEW: error: missing argument to loop pragma 'vectorize' #pragma clang loop vectorize_width(bad) OLD: error: missing value; expected a positive integer value NEW: error: invalid argument; expected a positive integer value #pragma clang loop vectorize(bad) OLD: invalid keyword 'bad'; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' http://reviews.llvm.org/D4197 Patch by Mark Heffernan git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211292 91177308-0d34-0410-b5e6-96231b3b80d8
* Document unroll and unroll_count directives.Eli Bendersky2014-06-19
| | | | | | | | | | | Extend the documentation for "#pragma clang loop" hints to include the unroll and unroll_count directives. Patch by Mark Heffernan [http://reviews.llvm.org/D4198] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211286 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++1z] Implement N3994: a range-based for loop can declare a variable with ↵Richard Smith2014-06-19
| | | | | | | | | | | | | super-terse notation for (x : range) { ... } which is equivalent to for (auto &&x : range) { ... } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211267 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improved diagnostic messages for vars with the predetermined data ↵Alexey Bataev2014-06-19
| | | | | | sharing attributes and reformatting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211262 91177308-0d34-0410-b5e6-96231b3b80d8
* DiagnoseUnknownTypename always emits a diagnostic and returns trueReid Kleckner2014-06-19
| | | | | | | | Make it return void and delete the dead code in the parser that handled the case where it might return false. This has been dead since 2010 when John deleted Action.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211248 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-18
| | | | | | | | | retainable ObjC pointers without requiring a bridge-cast in the context of pointer comparison as this is in effect a +0 context. // rdar://16627903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211243 91177308-0d34-0410-b5e6-96231b3b80d8
* Sema: Static redeclaration after extern declarations is a Microsoft ExtensionDavid Majnemer2014-06-18
| | | | | | | | | | | CL permits static redeclarations to follow extern declarations. The storage specifier on the latter declaration has no effect. This fixes PR20034. Differential Revision: http://reviews.llvm.org/D4149 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211238 91177308-0d34-0410-b5e6-96231b3b80d8