jansvoboda11 wrote:

> Also looks like [this 
> assert](https://github.com/llvm/llvm-project/blob/14469a8726fc1d038f41c7e3e29a84ec8f52d013/clang/include/clang/Frontend/ASTUnit.h#L472)
>  doesn't serve its value anymore
> 
> ```c++
>   const LangOptions &getLangOpts() const {
>     assert(LangOpts && "ASTUnit does not have language options");
>     return *LangOpts;
>   }
> ```
> 
> But it is a minor cleanup, not blocking.

I think it still does have a value because `LangOpts` is not initialized in the 
constructor and only gets initialized conditionally. So there still are times 
where it's null.

https://github.com/llvm/llvm-project/pull/137675
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to