Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 9906261..ae091e3 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -3842,8 +3842,7 @@
}
// A template argument must have static storage duration.
- // FIXME: Ensure this works for thread_local as well as __thread.
- if (Var->isThreadSpecified()) {
+ if (Var->getTLSKind()) {
S.Diag(Arg->getLocStart(), diag::err_template_arg_thread_local)
<< Arg->getSourceRange();
S.Diag(Var->getLocation(), diag::note_template_arg_refers_here);