[clang] de0c6bd - Add -o /dev/null to make it explicit that we don't care about the

2020-07-17 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2020-07-17T14:21:13+02:00
New Revision: de0c6bd56b41081f1b89a1c7a0bf2597fd6d0104

URL: 
https://github.com/llvm/llvm-project/commit/de0c6bd56b41081f1b89a1c7a0bf2597fd6d0104
DIFF: 
https://github.com/llvm/llvm-project/commit/de0c6bd56b41081f1b89a1c7a0bf2597fd6d0104.diff

LOG: Add -o /dev/null to make it explicit that we don't care about the
compiler output.

Added: 


Modified: 
clang/test/Driver/aarch64-sve-vector-bits.c

Removed: 




diff  --git a/clang/test/Driver/aarch64-sve-vector-bits.c 
b/clang/test/Driver/aarch64-sve-vector-bits.c
index b7138d4a0772..c3d0d05bb9b6 100644
--- a/clang/test/Driver/aarch64-sve-vector-bits.c
+++ b/clang/test/Driver/aarch64-sve-vector-bits.c
@@ -45,8 +45,8 @@
 
 // Error if using attribute without -msve-vector-bits
 // 
-
-// RUN: not %clang -c %s -target aarch64-none-linux-gnu -march=armv8-a+sve \
-// RUN:  2>&1 | FileCheck --check-prefix=CHECK-NO-FLAG-ERROR %s
+// RUN: not %clang -c %s -o /dev/null -target aarch64-none-linux-gnu \
+// RUN:  -march=armv8-a+sve 2>&1 | FileCheck 
--check-prefix=CHECK-NO-FLAG-ERROR %s
 
 typedef __SVInt32_t svint32_t;
 typedef svint32_t noflag __attribute__((arm_sve_vector_bits(256)));
@@ -55,8 +55,8 @@ typedef svint32_t noflag 
__attribute__((arm_sve_vector_bits(256)));
 
 // Error if attribute vector size != -msve-vector-bits
 // 
-
-// RUN: not %clang -c %s -target aarch64-none-linux-gnu -march=armv8-a+sve \
-// RUN:  -msve-vector-bits=128 2>&1 | FileCheck 
--check-prefix=CHECK-BAD-VECTOR-SIZE-ERROR %s
+// RUN: not %clang -c %s -o /dev/null -target aarch64-none-linux-gnu \
+// RUN:  -march=armv8-a+sve -msve-vector-bits=128 2>&1 | FileCheck 
--check-prefix=CHECK-BAD-VECTOR-SIZE-ERROR %s
 
 typedef svint32_t bad_vector_size __attribute__((arm_sve_vector_bits(256)));
 



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cc344d2 - [clang] Add static_cast to fix Bazel build.

2022-05-05 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2022-05-05T10:29:47+02:00
New Revision: cc344d262a2eaa65f9e380f5b1eeb03a7048fa39

URL: 
https://github.com/llvm/llvm-project/commit/cc344d262a2eaa65f9e380f5b1eeb03a7048fa39
DIFF: 
https://github.com/llvm/llvm-project/commit/cc344d262a2eaa65f9e380f5b1eeb03a7048fa39.diff

LOG: [clang] Add static_cast to fix Bazel build.

Differential Revision: https://reviews.llvm.org/D124995

Added: 


Modified: 
clang/lib/ExtractAPI/ExtractAPIConsumer.cpp

Removed: 




diff  --git a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp 
b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
index 70c8bac59ce97..a7b0a1ac98a78 100644
--- a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
+++ b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
@@ -927,7 +927,8 @@ bool 
ExtractAPIAction::PrepareToExecuteAction(CompilerInstance &CI) {
 HeaderContents += "\"\n";
   else
 HeaderContents += ">\n";
-  KnownInputFiles.emplace_back(*RelativeName, IsQuoted);
+  KnownInputFiles.emplace_back(static_cast>(*RelativeName),
+   IsQuoted);
 } else {
   HeaderContents += " \"";
   HeaderContents += FilePath;



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 25a02c3 - Revert "PR24076, PR33655, C++ CWG 1558: Consider the instantiation-dependence of"

2020-12-23 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2020-12-23T12:31:52+01:00
New Revision: 25a02c3d1a688d3cd18faef96c75fa553efbbac7

URL: 
https://github.com/llvm/llvm-project/commit/25a02c3d1a688d3cd18faef96c75fa553efbbac7
DIFF: 
https://github.com/llvm/llvm-project/commit/25a02c3d1a688d3cd18faef96c75fa553efbbac7.diff

LOG: Revert "PR24076, PR33655, C++ CWG 1558: Consider the 
instantiation-dependence of"

This reverts commit d3bf0bb18952d830fe6df6f791a64552b271000b.
This causes compilation in certain cases to fail.
Reproducer TBD.

Added: 


Modified: 
clang/include/clang/AST/Type.h
clang/lib/AST/ItaniumMangle.cpp
clang/test/CXX/drs/dr15xx.cpp
clang/test/CodeGenCXX/mangle-template.cpp
clang/test/SemaTemplate/partial-spec-instantiate.cpp
clang/www/cxx_dr_status.html

Removed: 
clang/test/SemaTemplate/instantiation-dependence.cpp



diff  --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index 21c8bf79152e..684005c4876d 100644
--- a/clang/include/clang/AST/Type.h
+++ b/clang/include/clang/AST/Type.h
@@ -5411,9 +5411,7 @@ class ElaboratedType final
   ElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS,
  QualType NamedType, QualType CanonType, TagDecl *OwnedTagDecl)
   : TypeWithKeyword(Keyword, Elaborated, CanonType,
-NamedType->getDependence() |
-(NNS ? toTypeDependence(NNS->getDependence())
- : TypeDependence::None)),
+NamedType->getDependence()),
 NNS(NNS), NamedType(NamedType) {
 ElaboratedTypeBits.HasOwnedTagDecl = false;
 if (OwnedTagDecl) {

diff  --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 6c8d5687c64a..73c8f17a5d36 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -2578,10 +2578,6 @@ void CXXNameMangler::mangleType(QualType T) {
 if (!TST->isTypeAlias())
   break;
 
-  // FIXME: We presumably shouldn't strip off ElaboratedTypes with
-  // instantation-dependent qualifiers. See
-  // https://github.com/itanium-cxx-abi/cxx-abi/issues/114.
-
   QualType Desugared
 = T.getSingleStepDesugaredType(Context.getASTContext());
   if (Desugared == T)

diff  --git a/clang/test/CXX/drs/dr15xx.cpp b/clang/test/CXX/drs/dr15xx.cpp
index 8bfa29a8b667..478a0d7d00dd 100644
--- a/clang/test/CXX/drs/dr15xx.cpp
+++ b/clang/test/CXX/drs/dr15xx.cpp
@@ -239,20 +239,6 @@ namespace dr1550 { // dr1550: yes
   }
 }
 
-namespace dr1558 { // dr1558: 12
-#if __cplusplus >= 201103L
-  template using first_of = T;
-  template first_of f(int); // expected-note 
{{'int' cannot be used prior to '::'}}
-  template void f(...) = delete; // expected-note {{deleted}}
-
-  struct X { typedef void type; };
-  void test() {
-f(0);
-f(0); // expected-error {{deleted}}
-  }
-#endif
-}
-
 namespace dr1560 { // dr1560: 3.5
   void f(bool b, int n) {
 (b ? throw 0 : n) = (b ? n : throw 0) = 0;

diff  --git a/clang/test/CodeGenCXX/mangle-template.cpp 
b/clang/test/CodeGenCXX/mangle-template.cpp
index 40688de7e12e..9b5220572c2e 100644
--- a/clang/test/CodeGenCXX/mangle-template.cpp
+++ b/clang/test/CodeGenCXX/mangle-template.cpp
@@ -342,23 +342,3 @@ namespace fixed_size_parameter_pack {
   template void f(A::B<0, Ns...>);
   void g() { f<1, 2>({}); }
 }
-
-namespace type_qualifier {
-  template using int_t = int;
-  template void f(decltype(int_t() + 1)) {}
-  // FIXME: This mangling doesn't work: we need to mangle the
-  // instantiation-dependent 'int_t' operand.
-  // CHECK: @_ZN14type_qualifier1fIPiEEvDTplcvi_ELi1EE
-  template void f(int);
-
-  // Note that this template has 
diff erent constraints but would mangle the
-  // same:
-  //template void f(decltype(int_t() + 1)) {}
-
-  struct impl { using type = void; };
-  template using alias = impl;
-  template void g(decltype(alias::type(), 1)) {}
-  // FIXME: Similarly we need to mangle the `T*` in here.
-  // CHECK: @_ZN14type_qualifier1gIPiEEvDTcmcvv_ELi1EE
-  template void g(int);
-}

diff  --git a/clang/test/SemaTemplate/instantiation-dependence.cpp 
b/clang/test/SemaTemplate/instantiation-dependence.cpp
deleted file mode 100644
index 75eb510cb68d..
--- a/clang/test/SemaTemplate/instantiation-dependence.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// RUN: %clang_cc1 -std=c++2b -verify %s
-
-// Ensure we substitute into instantiation-dependent but non-dependent
-// constructs. The poster-child for this is...
-template using void_t = void;
-
-namespace PR24076 {
-  template T declval();
-  struct s {};
-
-  template() + 1)>>
-void foo(T) {} // expected-note {{invalid operands to binary expression}}
-
-  void f() {
-foo(s{}); // expected-error {{no matching function}}
-  }
-
-  template() + 1)>> // expected-error 
{{invalid operands to binary expression}}
-  struct bar {};
-
-  bar b

[clang] cbb09c5 - Revert "[clang] fixes named return of variables with dependent alignment"

2021-07-06 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2021-07-06T10:31:39+02:00
New Revision: cbb09c5b2c2e0558de50355f4cbbbe2d2840073e

URL: 
https://github.com/llvm/llvm-project/commit/cbb09c5b2c2e0558de50355f4cbbbe2d2840073e
DIFF: 
https://github.com/llvm/llvm-project/commit/cbb09c5b2c2e0558de50355f4cbbbe2d2840073e.diff

LOG: Revert "[clang] fixes named return of variables with dependent alignment"

This reverts commit 21106388eb96c87b3f580c42a322c76a61605261.
It causes a segfault in certain cases.

Added: 


Modified: 
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaStmt.cpp
clang/test/CodeGen/nrvo-tracking.cpp

Removed: 




diff  --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index d22594ae8442a..020df62755706 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -1494,9 +1494,6 @@ class VarDecl : public DeclaratorDecl, public 
Redeclarable {
 NonParmVarDeclBits.EscapingByref = true;
   }
 
-  /// Determines if this variable's alignment is dependent.
-  bool hasDependentAlignment() const;
-
   /// Retrieve the variable declaration from which this variable could
   /// be instantiated, if it is an instantiation (rather than a non-template).
   VarDecl *getTemplateInstantiationPattern() const;

diff  --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index a92d3726e8474..5047dc19b0c6f 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2534,13 +2534,6 @@ bool VarDecl::isNonEscapingByref() const {
   return hasAttr() && !NonParmVarDeclBits.EscapingByref;
 }
 
-bool VarDecl::hasDependentAlignment() const {
-  return getType()->isDependentType() ||
- llvm::any_of(specific_attrs(), [](const AlignedAttr *AA) 
{
-   return AA->isAlignmentDependent();
- });
-}
-
 VarDecl *VarDecl::getTemplateInstantiationPattern() const {
   const VarDecl *VD = this;
 

diff  --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9e1f42a15e556..0075464552321 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13310,6 +13310,16 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl 
*var) {
 CheckCompleteDecompositionDeclaration(DD);
 }
 
+/// Determines if a variable's alignment is dependent.
+static bool hasDependentAlignment(VarDecl *VD) {
+  if (VD->getType()->isDependentType())
+return true;
+  for (auto *I : VD->specific_attrs())
+if (I->isAlignmentDependent())
+  return true;
+  return false;
+}
+
 /// Check if VD needs to be dllexport/dllimport due to being in a
 /// dllexport/import function.
 void Sema::CheckStaticLocalForDllExport(VarDecl *VD) {
@@ -13398,7 +13408,7 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
   if (unsigned MaxAlign = Context.getTargetInfo().getMaxTLSAlign()) {
 // Protect the check so that it's not performed on dependent types and
 // dependent alignments (we can't determine the alignment in that case).
-if (VD->getTLSKind() && !VD->hasDependentAlignment() &&
+if (VD->getTLSKind() && !hasDependentAlignment(VD) &&
 !VD->isInvalidDecl()) {
   CharUnits MaxAlignChars = Context.toCharUnitsFromBits(MaxAlign);
   if (Context.getDeclAlign(VD) > MaxAlignChars) {

diff  --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 506c06b412b6f..1e86f382f060b 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -3395,7 +3395,7 @@ Sema::NamedReturnInfo Sema::getNamedReturnInfo(const 
VarDecl *VD) {
 
   // Variables with higher required alignment than their type's ABI
   // alignment cannot use NRVO.
-  if (!VD->hasDependentAlignment() &&
+  if (!VDType->isDependentType() && VD->hasAttr() &&
   Context.getDeclAlign(VD) > Context.getTypeAlignInChars(VDType))
 Info.S = NamedReturnInfo::MoveEligible;
 

diff  --git a/clang/test/CodeGen/nrvo-tracking.cpp 
b/clang/test/CodeGen/nrvo-tracking.cpp
index 2d6eb9efeca20..7893140e1010a 100644
--- a/clang/test/CodeGen/nrvo-tracking.cpp
+++ b/clang/test/CodeGen/nrvo-tracking.cpp
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -std=c++20 -fblocks -Wno-return-stack-address -triple 
x86_64-unknown-unknown-gnu -emit-llvm -O1 -fexperimental-new-pass-manager -o - 
%s | FileCheck %s
 
-struct alignas(4) X {
-  X();
-  X(const X &);
-  X(X &&);
+struct X {
+X();
+X(const X&);
+X(X&&);
 };
 
 #define L(A, B, C) void l##A() {\
@@ -210,75 +210,3 @@ void b_attr() {
 };
   }()();
 }
-
-namespace test_alignas {
-
-template  X t1() {
-  X a [[gnu::aligned(A)]];
-  return a;
-}
-
-// CHECK-LABEL: define{{.*}} void @_ZN12test_alignas2t1ILi1EEE1Xv
-// CHECK:   call {{.*}} @_ZN1XC1Ev
-// CHECK-NEXT:  ret void
-template X t1<1>();
-
-// CHECK-LABEL: define{{.*}} void @_ZN12test_alignas2t1ILi4EEE1Xv
-// CHECK:   call {{.*}} @_ZN1XC1Ev
-// CHECK-NEXT:  ret void
-template X t1<4>();
-
-// CHECK-LABEL: 

[clang] bb49346 - Revert "Implement target_clones multiversioning"

2021-11-12 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2021-11-12T11:05:58+01:00
New Revision: bb4934601d731465e01e2e22c80ce2dbe687d73f

URL: 
https://github.com/llvm/llvm-project/commit/bb4934601d731465e01e2e22c80ce2dbe687d73f
DIFF: 
https://github.com/llvm/llvm-project/commit/bb4934601d731465e01e2e22c80ce2dbe687d73f.diff

LOG: Revert "Implement target_clones multiversioning"

This reverts commit 9deab60ae710f8c4cc810cd680edfb64c803f42d.
There is a possibly unintended semantic change.

Added: 


Modified: 
clang/include/clang/AST/Decl.h
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Decl.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/Sema/attr-cpuspecific.c

Removed: 
clang/test/CodeGen/attr-target-clones.c
clang/test/CodeGenCXX/attr-target-clones.cpp
clang/test/Sema/attr-target-clones.c
clang/test/SemaCXX/attr-target-clones.cpp



diff  --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 2eacf1105c18c..85a3a8ab69708 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -1840,8 +1840,7 @@ enum class MultiVersionKind {
   None,
   Target,
   CPUSpecific,
-  CPUDispatch,
-  TargetClones
+  CPUDispatch
 };
 
 /// Represents a function declaration or definition.
@@ -2460,10 +2459,6 @@ class FunctionDecl : public DeclaratorDecl,
   /// the target functionality.
   bool isTargetMultiVersion() const;
 
-  /// True if this function is a multiversioned dispatch function as a part of
-  /// the target-clones functionality.
-  bool isTargetClonesMultiVersion() const;
-
   /// \brief Get the associated-constraints of this function declaration.
   /// Currently, this will either be a vector of size 1 containing the
   /// trailing-requires-clause or an empty vector.

diff  --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index 1efde2a0f25f4..d8f0fcd56550c 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -2676,40 +2676,6 @@ def Target : InheritableAttr {
   }];
 }
 
-def TargetClones : InheritableAttr {
-  let Spellings = [GCC<"target_clones">];
-  let Args = [VariadicStringArgument<"featuresStrs">];
-  let Documentation = [TargetClonesDocs];
-  let Subjects = SubjectList<[Function], ErrorDiag>;
-  let AdditionalMembers = [{
-StringRef getFeatureStr(unsigned Index) const {
-  return *(featuresStrs_begin() + Index);
-}
-// 'default' is always moved to the end, so it isn't considered
-// when mangling the index.
-unsigned getMangledIndex(unsigned Index) const {
-  if (getFeatureStr(Index) == "default")
-return std::count_if(featuresStrs_begin(), featuresStrs_end(),
-  [](StringRef S) { return S != "default"; });
-
-  return std::count_if(featuresStrs_begin(), featuresStrs_begin() + Index,
-   [](StringRef S) { return S != "default"; });
-}
-
-// True if this is the first of this version to appear in the config 
string.
-// This is used to make sure we don't try to emit this function multiple
-// times.
-bool isFirstOfVersion(unsigned Index) const {
-  StringRef FeatureStr(getFeatureStr(Index));
-  return 0 == std::count_if(
-  featuresStrs_begin(), featuresStrs_begin() + Index,
-  [FeatureStr](StringRef S) { return S == FeatureStr; });
-}
-  }];
-}
-
-def : MutualExclusions<[TargetClones, Target, CPUDispatch, CPUSpecific]>;
-
 def MinVectorWidth : InheritableAttr {
   let Spellings = [Clang<"min_vector_width">];
   let Args = [UnsignedArgument<"VectorWidth">];

diff  --git a/clang/include/clang/Basic/AttrDocs.td 
b/clang/include/clang/Basic/AttrDocs.td
index 10cce4c2d6898..e7afb3699eb17 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -2233,40 +2233,6 @@ Additionally, a function may not become multiversioned 
after its first use.
 }];
 }
 
-def TargetClonesDocs : Documentation {
-  let Category = DocCatFunction;
-  let Content = [{
-Clang supports the ``target_clones("OPTIONS")`` attribute. This attribute may 
be
-attached to a function declaration and causes function multiversioning, where
-multiple versions of the function will be emitted with 
diff erent code
-generation options.  Additionally, these versions will be resolved at runtime
-based on the priority of their attribute options. All ``target_clone`` 
functions
-are considered multiversioned functions.
-
-All multiversioned functions must contain a `

[clang] d0d9d1e - [clang-format] Move bracket to correct line.

2022-10-25 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2022-10-25T11:06:02+02:00
New Revision: d0d9d1e3d232d4025bcb776117dc6a0df71da23c

URL: 
https://github.com/llvm/llvm-project/commit/d0d9d1e3d232d4025bcb776117dc6a0df71da23c
DIFF: 
https://github.com/llvm/llvm-project/commit/d0d9d1e3d232d4025bcb776117dc6a0df71da23c.diff

LOG: [clang-format] Move bracket to correct line.

Added: 


Modified: 
clang/lib/Format/TokenAnnotator.cpp

Removed: 




diff  --git a/clang/lib/Format/TokenAnnotator.cpp 
b/clang/lib/Format/TokenAnnotator.cpp
index 0b613c95110f..da6e21c48814 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1344,8 +1344,8 @@ class AnnotatingParser {
   while (CurrentToken) {
 if (IsMarkOrRegion || CurrentToken->Previous->is(TT_BinaryOperator)) {
   CurrentToken->setType(TT_ImplicitStringLiteral);
-next();
 }
+next();
   }
 }
   }



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 9698a44 - Fix warning by handling OMPC_fail in switch statement.

2022-05-25 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2022-05-25T09:33:41+02:00
New Revision: 9698a445c664e6f0da5727364338ee99de537d6a

URL: 
https://github.com/llvm/llvm-project/commit/9698a445c664e6f0da5727364338ee99de537d6a
DIFF: 
https://github.com/llvm/llvm-project/commit/9698a445c664e6f0da5727364338ee99de537d6a.diff

LOG: Fix warning by handling OMPC_fail in switch statement.

Added: 


Modified: 
clang/lib/CodeGen/CGStmtOpenMP.cpp

Removed: 




diff  --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp 
b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 61e3661e59be0..ebe65e5f72b3e 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -6317,6 +6317,7 @@ static void emitOMPAtomicExpr(CodeGenFunction &CGF, 
OpenMPClauseKind Kind,
   case OMPC_bind:
   case OMPC_align:
   case OMPC_cancellation_construct_type:
+  case OMPC_fail:
 llvm_unreachable("Clause is not allowed in 'omp atomic'.");
   }
 }



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 5156e38 - Fix memtag test.

2020-03-17 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2020-03-17T11:06:32+01:00
New Revision: 5156e38eb1d3d0ef5bce1fc8491a05f3cfca0f89

URL: 
https://github.com/llvm/llvm-project/commit/5156e38eb1d3d0ef5bce1fc8491a05f3cfca0f89
DIFF: 
https://github.com/llvm/llvm-project/commit/5156e38eb1d3d0ef5bce1fc8491a05f3cfca0f89.diff

LOG: Fix memtag test.

Summary: Matching %x makes the test fail.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76272

Added: 


Modified: 
clang/test/Driver/memtag.c

Removed: 




diff  --git a/clang/test/Driver/memtag.c b/clang/test/Driver/memtag.c
index 9c548910048e..bfe453beef56 100644
--- a/clang/test/Driver/memtag.c
+++ b/clang/test/Driver/memtag.c
@@ -17,7 +17,7 @@ __attribute__((noinline)) void use(int *p) { *p = z; }
 int foo() { int x; use(&x); return x; }
 
 // CHECK-NO-SAFETY: define dso_local i32 @foo()
-// CHECK-NO-SAFETY: %x = alloca i32, align 4{{$}}
+// CHECK-NO-SAFETY: %{{.*}} = alloca i32, align 4{{$}}
 
 // CHECK-SAFETY: define dso_local i32 @foo()
-// CHECK-SAFETY: %x = alloca i32, align 4, !stack-safe
+// CHECK-SAFETY: %{{.*}} = alloca i32, align 4, !stack-safe



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D23492: Make function local tags visible.

2016-08-22 Thread Adrian Kuegel via cfe-commits
akuegel added a subscriber: akuegel.


Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3617
@@ +3616,3 @@
+PatternDef = nullptr;
+  // FIXME: We need to track the instantiation stack in order to know which
+  // definitions should be visible within this instantiation.

Line 3619 to 3623 breaks the compilation of some of our targets. I am not sure 
if it is because of a mistake in our code or if there is something bad in this 
patch.
This comment seems to indicate that there is still something missing to make 
the check here correct?


https://reviews.llvm.org/D23492



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D23492: Make function local tags visible.

2016-08-22 Thread Adrian Kuegel via cfe-commits
akuegel added inline comments.


Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3617
@@ +3616,3 @@
+PatternDef = nullptr;
+  // FIXME: We need to track the instantiation stack in order to know which
+  // definitions should be visible within this instantiation.

v.g.vassilev wrote:
> akuegel wrote:
> > Line 3619 to 3623 breaks the compilation of some of our targets. I am not 
> > sure if it is because of a mistake in our code or if there is something bad 
> > in this patch.
> > This comment seems to indicate that there is still something missing to 
> > make the check here correct?
> @akuegel, would you be able to reduce a standalone example?
I tried to create a simple example, but those simple cases worked fine. So I am 
not sure what is going on in the more complex cases. I have asked Richard for 
help. Since Richard has access to that broken code, I hope he will figure it 
out.


https://reviews.llvm.org/D23492



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Adrian Kuegel via cfe-commits
akuegel added a subscriber: akuegel.
akuegel added a comment.

lg



Comment at: lib/Tooling/Core/Replacement.cpp:163
@@ +162,3 @@
+  // Find the first entry that starts after the end of R.
+  // We cannot use upper_bound for that, as there might an element equal to
+  // AtEnd in Replaces, and AtEnd does not overlap.

nit: "as there might an" -> "as there might be an".


https://reviews.llvm.org/D23119



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 75aca24 - [clang] Fix reference to file that was moved.

2022-03-08 Thread Adrian Kuegel via cfe-commits

Author: Adrian Kuegel
Date: 2022-03-08T12:26:02+01:00
New Revision: 75aca24d2f49a646df5a443c55bc020450fe04a7

URL: 
https://github.com/llvm/llvm-project/commit/75aca24d2f49a646df5a443c55bc020450fe04a7
DIFF: 
https://github.com/llvm/llvm-project/commit/75aca24d2f49a646df5a443c55bc020450fe04a7.diff

LOG: [clang] Fix reference to file that was moved.

Added: 


Modified: 
clang/docs/tools/clang-formatted-files.txt

Removed: 




diff  --git a/clang/docs/tools/clang-formatted-files.txt 
b/clang/docs/tools/clang-formatted-files.txt
index ec18d87cca0e0..e0ce9b1c29228 100644
--- a/clang/docs/tools/clang-formatted-files.txt
+++ b/clang/docs/tools/clang-formatted-files.txt
@@ -7541,7 +7541,7 @@ mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
 mlir/include/mlir/InitAllDialects.h
 mlir/include/mlir/InitAllPasses.h
 mlir/include/mlir/InitAllTranslations.h
-mlir/include/mlir/Parser.h
+mlir/include/mlir/Parser/Parser.h
 mlir/include/mlir/Translation.h
 mlir/include/mlir/Analysis/BufferViewFlowAnalysis.h
 mlir/include/mlir/Analysis/DataFlowAnalysis.h



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits