diff options
Diffstat (limited to 'clang/lib/Sema/SemaCUDA.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCUDA.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp index abfe107d000..822304195d5 100644 --- a/clang/lib/Sema/SemaCUDA.cpp +++ b/clang/lib/Sema/SemaCUDA.cpp @@ -443,7 +443,7 @@ bool Sema::isEmptyCudaDestructor(SourceLocation Loc, CXXDestructorDecl *DD) { // system header, in which case we leave the constexpr function unattributed. void Sema::maybeAddCUDAHostDeviceAttrs(Scope *S, FunctionDecl *NewD, const LookupResult &Previous) { - assert(getLangOpts().CUDA && "May be called only for CUDA compilations."); + assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); if (!getLangOpts().CUDAHostDeviceConstexpr || !NewD->isConstexpr() || NewD->isVariadic() || NewD->hasAttr<CUDAHostAttr>() || NewD->hasAttr<CUDADeviceAttr>() || NewD->hasAttr<CUDAGlobalAttr>()) @@ -482,8 +482,7 @@ void Sema::maybeAddCUDAHostDeviceAttrs(Scope *S, FunctionDecl *NewD, } bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) { - assert(getLangOpts().CUDA && - "Should only be called during CUDA compilation."); + assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); assert(Callee && "Callee may not be null."); FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext); if (!Caller) @@ -561,6 +560,7 @@ bool Sema::CheckCUDAVLA(SourceLocation Loc) { } void Sema::CUDASetLambdaAttrs(CXXMethodDecl *Method) { + assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); if (Method->hasAttr<CUDAHostAttr>() || Method->hasAttr<CUDADeviceAttr>()) return; FunctionDecl *CurFn = dyn_cast<FunctionDecl>(CurContext); |