Branch: refs/heads/master
Revision: 7f34e0d
Author: mppf
Log Message:
Merge pull request #17810 from mppf/fix-parser-eof
compiler/next: fix parser EOF bug, add warnings, and fix warnings
This PR fixes a core dump when parsing something like /* comment
(an
unterminated comment). It wasn't clear to me how to communicate to flex
that EOF had been reached with a push parser so this PR simply adds an
atEOF
bool to ParserContext
and checks it while parsing.
While there, I noticed an unused variable that was not generating a
compilation warning. So this PR also adjusts
compiler/next/Makefile.help
to include the warning flags from the usual
Makefiles so that we get these. I fixed a number of warnings that came up
as a result.
To resolve a clang
error with redundant dependency flags,
avoids adding the DEPEND_CFLAGS
to the cmake configure step.
Reviewed by @dlongnecke-cray - thanks!
Modified Files:
M compiler/make/Makefile.compiler.head
M compiler/next/Makefile.help
M compiler/next/include/chpl/queries/Context-detail.h
M compiler/next/include/chpl/uast/ASTNode.h
M compiler/next/include/chpl/uast/FnCall.h
M compiler/next/include/chpl/uast/For.h
M compiler/next/include/chpl/uast/Function.h
M compiler/next/include/chpl/uast/New.h
M compiler/next/lib/frontend/Parser.cpp
M compiler/next/lib/frontend/Parser/ParserContext.h
M compiler/next/lib/frontend/Parser/ParserContextImpl.h
M compiler/next/lib/frontend/Parser/chapel.ypp
M compiler/next/lib/frontend/Parser/lexer-help.h
M compiler/next/lib/frontend/frontend-queries.cpp
M compiler/next/lib/queries/Context.cpp
M compiler/next/lib/queries/UniqueString.cpp
M compiler/next/lib/uast/Builder.cpp
M compiler/next/lib/uast/FnCall.cpp
M compiler/next/lib/uast/New.cpp
M compiler/next/test/frontend/testFrontendQueries.cpp
M compiler/next/test/frontend/testParse.cpp
M compiler/next/test/frontend/testParseFunctions.cpp
M compiler/next/test/frontend/testParseModules.cpp
M compiler/next/test/queries/testDependencies.cpp
M compiler/next/test/queries/testRecursionFails.cpp
M compiler/next/test/uast/testBuildIDs.cpp
M compiler/next/test/uast/testConsistentEnums.cpp
M compiler/next/test/uast/testUniqueString.cpp
Compare: https://github.com/chapel-lang/chapel/compare/f676ff3fa28e...7f34e0d9882d