[clang] Fix dependence handling of nttp for variable templates (PR #69075)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 14 12:00:03 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 8dd3bc18081657fee2352cf5b1c6abacb18fcc84 7a5eef02445d4d1969e5335d0ab7cb5edfb72889 -- clang/include/clang/AST/ExprCXX.h clang/lib/AST/ASTImporter.cpp clang/lib/AST/ExprCXX.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaTemplate.cpp clang/test/SemaTemplate/dependent-expr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp
index c88f297de..5fbfa3a78 100644
--- a/clang/lib/AST/ExprCXX.cpp
+++ b/clang/lib/AST/ExprCXX.cpp
@@ -356,8 +356,8 @@ UnresolvedLookupExpr::UnresolvedLookupExpr(
const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin,
UnresolvedSetIterator End, bool KnownDependent)
: OverloadExpr(UnresolvedLookupExprClass, Context, QualifierLoc,
- TemplateKWLoc, NameInfo, TemplateArgs, Begin, End, KnownDependent,
- false, false),
+ TemplateKWLoc, NameInfo, TemplateArgs, Begin, End,
+ KnownDependent, false, false),
NamingClass(NamingClass) {
UnresolvedLookupExprBits.RequiresADL = RequiresADL;
UnresolvedLookupExprBits.Overloaded = Overloaded;
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 3860a90c4..6389ec708 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -5003,13 +5003,10 @@ ExprResult Sema::BuildTemplateIdExpr(const CXXScopeSpec &SS,
// We don't want lookup warnings at this point.
R.suppressDiagnostics();
- UnresolvedLookupExpr *ULE
- = UnresolvedLookupExpr::Create(Context, R.getNamingClass(),
- SS.getWithLocInContext(Context),
- TemplateKWLoc,
- R.getLookupNameInfo(),
- RequiresADL, TemplateArgs,
- R.begin(), R.end(), KnownDependent);
+ UnresolvedLookupExpr *ULE = UnresolvedLookupExpr::Create(
+ Context, R.getNamingClass(), SS.getWithLocInContext(Context),
+ TemplateKWLoc, R.getLookupNameInfo(), RequiresADL, TemplateArgs,
+ R.begin(), R.end(), KnownDependent);
return ULE;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69075
More information about the cfe-commits
mailing list