yaxunl added inline comments.
================ Comment at: lib/Sema/SemaDecl.cpp:6085 + // space qualifier or with the const qualifier. + if (DC->isTranslationUnit() && + !(R.getAddressSpace() == LangAS::opencl_constant || ---------------- svenvh wrote: > yaxunl wrote: > > should be else if ? > > > > if the previous error already happens, it is unnecessary to do the next > > check > > Sure, I can do that, I am just not sure what the desirable behaviour is here? > They are different errors, so with the current patch it emits both > diagnostics (see the first test change). If we just want one diagnostic (the > first one in that test case), I can change it to else if; please let me know > if you prefer that. On second thoughts, let's keep it as it is. Can you add tests for const sampler_t const constant sampler_t const global sampler_t Thanks. https://reviews.llvm.org/D32856 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits