ioeric added inline comments.
================ Comment at: unittests/Index/IndexTests.cpp:61 + S.Roles = Roles; + if (MI) + S.Info = getSymbolInfoForMacro(*MI); ---------------- ilya-biryukov wrote: > ioeric wrote: > > ilya-biryukov wrote: > > > Can this actually happen? It seems weird to have a macro occurrence > > > without a `MacroInfo`. > > > Maybe try asserting that MI is non-null instead? > > this can happen for macros that are #undefined. Not relevant anymore. > Ah, makes sense, thanks. > Any reason to not report those? It looks like a valuable information (e.g. to > avoid showing undefined macros in code completion). I don't think this is a bug e.g. SemaCodeCompletion can intentionally show undefined macros in some contexts. It's up to the index consumer implementations how to handle undefinitions. Repository: rC Clang https://reviews.llvm.org/D52098 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits