Skip to content
  1. Feb 01, 2019
  2. Jan 31, 2019
    • Nico Weber's avatar
      Make clang/test/Index/pch-from-libclang.c pass in more places · 0abcafd8
      Nico Weber authored
      - fixes the test on macOS with LLVM_ENABLE_PIC=OFF
      - together with D57343, gets the test to pass on Windows
      - makes it run everywhere (it seems to just pass on Linux)
      
      The main change is to pull out the resource directory computation into a
      function shared by all 3 places that do it. In CIndexer.cpp, this now works no
      matter if libclang is in lib/ or bin/ or statically linked to a binary in bin/.
      
      
      Differential Revision: https://reviews.llvm.org/D57345
      
      llvm-svn: 352803
      0abcafd8
  3. Jan 28, 2019
    • Roman Lebedev's avatar
      [clang][OpenMP] OMPFlushClause is synthetic, no such clause exists · 23019f94
      Roman Lebedev authored
      Summary:
      As discussed in https://reviews.llvm.org/D57112#inline-506781,
      'flush' clause does not exist in the OpenMP spec, it can not be
      specified, and `OMPFlushClause` class is just a helper class.
      
      Therefore `OPENMP_CLAUSE()` in `clang/Basic/OpenMPKinds.def`
      should not contain 'flush' "clause".
      
      I have simply removed the `OPENMP_CLAUSE(flush, OMPFlushClause)`
      from `clang/Basic/OpenMPKinds.def`, grepped for `OPENMP_CLAUSE`
      and added `OPENMP_CLAUSE(flush, OMPFlushClause)` back to the **every**
      place where `OPENMP_CLAUSE` is defined and `clang/Basic/OpenMPKinds.def`
      is then included.
      
      So as-is, this patch is a NFC. Possibly, some of these
      `OPENMP_CLAUSE(flush, OMPFlushClause)` should be dropped,
      i don't really know.
      
      Test plan: `ninja check-clang`
      
      Reviewers: ABataev
      
      Reviewed By: ABataev
      
      Subscribers: guansong, arphaman, cfe-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D57280
      
      llvm-svn: 352390
      23019f94
    • Anastasia Stulova's avatar
      Rename getTypeQualifiers to getMethodQualifiers. · c61eaa59
      Anastasia Stulova authored
      Use more descriptive name for the method qualifiers getter.
      
      Differential Revision: https://reviews.llvm.org/D56792
      
      llvm-svn: 352349
      c61eaa59
  4. Jan 26, 2019
    • Nico Weber's avatar
      Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFF · e9cac31d
      Nico Weber authored
      libclang can be built in shared or static mode. On Windows, with
      LLVM_ENABLE_PIC=OFF, it was built in neither mode, leading to clients of
      libclang (c-index-test, c-arcmt-test) failing to link with it set.
      
      Since PIC isn't really a thing on Windows, build libclang in shared mode when
      LLVM_ENABLE_PIC=OFF there. This is also somewhat symmetric with the existing
      ENABLE_STATIC a few lines down.
      
      Differential Revision: https://reviews.llvm.org/D57258
      
      llvm-svn: 352253
      e9cac31d
  5. Jan 24, 2019
  6. Jan 20, 2019
    • Serge Guelton's avatar
      Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> · be88539b
      Serge Guelton authored
      As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for
      isPodLike<std::pair<...>> did not match the expectation of
      std::is_trivially_copyable which makes the memcpy optimization invalid.
      
      This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable.
      Unfortunately std::is_trivially_copyable is not portable across compiler / STL
      versions. So a portable version is provided too.
      
      Note that the following specialization were invalid:
      
          std::pair<T0, T1>
          llvm::Optional<T>
      
      Tests have been added to assert that former specialization are respected by the
      standard usage of llvm::is_trivially_copyable, and that when a decent version
      of std::is_trivially_copyable is available, llvm::is_trivially_copyable is
      compared to std::is_trivially_copyable.
      
      As of this patch, llvm::Optional is no longer considered trivially copyable,
      even if T is. This is to be fixed in a later patch, as it has impact on a
      long-running bug (see r347004)
      
      Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296.
      
      Differential Revision: https://reviews.llvm.org/D54472
      
      llvm-svn: 351701
      be88539b
  7. Jan 19, 2019
    • Chandler Carruth's avatar
      Update the file headers across all of the LLVM projects in the monorepo · 2946cd70
      Chandler Carruth authored
      to reflect the new license.
      
      We understand that people may be surprised that we're moving the header
      entirely to discuss the new license. We checked this carefully with the
      Foundation's lawyer and we believe this is the correct approach.
      
      Essentially, all code in the project is now made available by the LLVM
      project under our new license, so you will see that the license headers
      include that license only. Some of our contributors have contributed
      code under our old license, and accordingly, we have retained a copy of
      our old license notice in the top-level files in each project and
      repository.
      
      llvm-svn: 351636
      2946cd70
  8. Jan 10, 2019
  9. Jan 09, 2019
  10. Jan 08, 2019
    • Alex Lorenz's avatar
      [libclang] Recommit r336590 with a fix for the memory leak in the test · 65317e1c
      Alex Lorenz authored
      The original commit had a memory leak in the test has a leak as it doesn't
      dispose of the evaluated cursor result.
      
      This also contains the follow-up NFC refactoring commit r336591.
      
      rdar://45893054
      
      Original commit message:
      
      [libclang] evalute compound statement cursors before trying to evaluate
      the cursor like a declaration
      
      This change fixes a bug in libclang in which it tries to evaluate a statement
      cursor as a declaration cursor, because that statement still has a pointer to
      the declaration parent.
      
      rdar://38888477
      
      Differential Revision: https://reviews.llvm.org/D49051
      
      llvm-svn: 350666
      65317e1c
  11. Jan 03, 2019
    • Alex Lorenz's avatar
      [libclang] CoroutineBody/Coreturn statements are UnexposedStmts and not Exprs · 977ffd7b
      Alex Lorenz authored
      This change ensures that the libclang CXCursor represents the CoroutineBody
      and the Coreturn statement using the appropriate CXCursor_UnexposedStmt kind
      instead of CXCursor_UnexposedExpr. The problem with CXCursor_UnexposedExpr is
      that the consumer functions assumed that CoroutineBody/Coreturn statements
      were valid expressions and performed an invalid downcast to Expr causing
      assertion failures or other crashes.
      
      rdar://40204290
      
      llvm-svn: 350282
      977ffd7b
  12. Dec 18, 2018
    • Haojian Wu's avatar
      [AST] Unify the code paths of traversing lambda expressions. · ef87c267
      Haojian Wu authored
      Summary:
      This supposes to be a non-functional change. We have two code paths when
      traversing lambda expressions:
      
      1) traverse the function proto typeloc when parameters and return type
      are explicit;
      2) otherwise fallback to traverse parameter decls and return type loc
      individually;
      
      This patch unifies the code path to always traverse parameters and
      return type, rather than relying on traversing the full type-loc.
      
      Reviewers: ilya-biryukov
      
      Subscribers: arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D55820
      
      llvm-svn: 349494
      ef87c267
  13. Dec 15, 2018
    • Fangrui Song's avatar
      [libclang] Add dependency on clangSerialization to unbreak... · 7643f42b
      Fangrui Song authored
      [libclang] Add dependency on clangSerialization to unbreak -DBUILD_SHARED_LIBS=1 build after rC349237
      
      Frontend headers have undefined reference on the symbol `clang::PCHContainerOperations::PCHContainerOperations()` through some shared_ptr usage. Any dependents will get the undefined reference which can only be resolved by explicit dependency on clangSerialization (due to -z defs).
      
      llvm-svn: 349259
      7643f42b
    • Richard Trieu's avatar
      Fix includes and dependencies for libclang · d2e5accd
      Richard Trieu authored
      Remove unneeded includes
      Add needed include
      Remove dependency on Serialization
      
      llvm-svn: 349237
      d2e5accd
  14. Dec 13, 2018
  15. Dec 12, 2018
    • Mikael Nilsson's avatar
      Revert "[OpenCL] Add generic AS to 'this' pointer" · 90646732
      Mikael Nilsson authored
      Reverting because the patch broke lldb.
      
      llvm-svn: 348931
      90646732
    • Mikael Nilsson's avatar
      [OpenCL] Add generic AS to 'this' pointer · 78de8471
      Mikael Nilsson authored
      Address spaces are cast into generic before invoking the constructor.
      
      Added support for a trailing Qualifiers object in FunctionProtoType.
      
      Differential Revision: https://reviews.llvm.org/D54862
      
      llvm-svn: 348927
      78de8471
    • Fangrui Song's avatar
      Add explicit dependency on clangSerialization for a bunch of components to fix... · 5313327f
      Fangrui Song authored
      Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build
      
      This is a more thorough fix of rC348911.
      The story about -DBUILD_SHARED_LIBS=on build after rC348907 (Move PCHContainerOperations from Frontend to Serialization) is:
      
      1. libclangSerialization.so defines PCHContainerReader dtor, ...
      2. clangFrontend and clangTooling define classes inheriting from PCHContainerReader, thus their DSOs have undefined references on PCHContainerReader dtor
      3. Components depending on either clangFrontend or clangTooling cannot be linked unless they have explicit dependency on clangSerialization due to the default linker option -z defs. The explicit dependency could be avoided if libclang{Frontend,Tooling}.so had these undefined references.
      
      This patch adds the explicit dependency on clangSerialization to make them build.
      
      llvm-svn: 348915
      5313327f
  16. Dec 10, 2018
  17. Nov 27, 2018
  18. Nov 26, 2018
  19. Nov 23, 2018
  20. Nov 20, 2018
  21. Nov 08, 2018
  22. Nov 07, 2018
    • Andrew Savonichev's avatar
      Revert r346326 [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation · 3b12b7e7
      Andrew Savonichev authored
      This patch breaks Index/opencl-types.cl LIT test:
      
      Script:
      --
      : 'RUN: at line 1';   stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl
      --
      Command Output (stderr):
      --
      llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas]
      llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas]
      llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed
      llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas]
      llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled
      llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled
      
      llvm-svn: 346338
      3b12b7e7
    • Andrew Savonichev's avatar
      [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension · 35dfce72
      Andrew Savonichev authored
      Summary:
      Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt
      
      Patch by Kristina Bessonova
      
      
      Reviewers: Anastasia, yaxunl, shafik
      
      Reviewed By: Anastasia
      
      Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51484
      
      llvm-svn: 346326
      35dfce72
  23. Nov 02, 2018
  24. Oct 31, 2018
    • Bill Wendling's avatar
      Create ConstantExpr class · 7c44da27
      Bill Wendling authored
      A ConstantExpr class represents a full expression that's in a context where a
      constant expression is required. This class reflects the path the evaluator
      took to reach the expression rather than the syntactic context in which the
      expression occurs.
      
      In the future, the class will be expanded to cache the result of the evaluated
      expression so that it's not needlessly re-evaluated
      
      Reviewed By: rsmith
      
      Differential Revision: https://reviews.llvm.org/D53475
      
      llvm-svn: 345692
      7c44da27
  25. Oct 30, 2018
  26. Oct 24, 2018
  27. Oct 11, 2018
  28. Oct 10, 2018
  29. Oct 03, 2018
  30. Oct 01, 2018
  31. Sep 27, 2018
  32. Sep 26, 2018
  33. Sep 18, 2018
    • Argyrios Kyrtzidis's avatar
      [index] Enhance indexing for module references · 32e5d862
      Argyrios Kyrtzidis authored
      * Create a USR for the occurrences of the 'module' symbol kind
      * Record module references for each identifier in an import declaration
      
      llvm-svn: 342484
      32e5d862
    • Sam McCall's avatar
      [CodeComplete] Add completions for filenames in #include directives. · 3d8051ab
      Sam McCall authored
      Summary:
      The dir component ("somedir" in #include <somedir/fo...>) is considered fixed.
      We append "foo" to each directory on the include path, and then list its files.
      
      Completions are of the forms:
       #include <somedir/fo^
                         foo.h>
                         fox/
      
      The filter is set to the filename part ("fo"), so fuzzy matching can be
      applied to the filename only.
      
      No fancy scoring/priorities are set, and no information is added to
      CodeCompleteResult to make smart scoring possible. Could be in future.
      
      Reviewers: ilya-biryukov
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D52076
      
      llvm-svn: 342449
      3d8051ab
  34. Sep 07, 2018
Loading