[7/7] gdb: make COMPLETE_CHAR a constexpr
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
In ada-exp-parser.h, make COMPLETE_CHAR a constexpr rather than a
macro.
While at it, fix the comment in ada-lex.l that refers to it. It used
the wrong name (COMPLETION_CHAR), and the constant is no longer
"below", it is now in ada-exp-parser.h. The explanation it points to
is now the comment on ada_parse_state::returned_complete.
Change-Id: I4ecfec782add66ab658bcb1494b1f78cdd432218
---
gdb/ada-exp-parser.h | 2 +-
gdb/ada-lex.l | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -24,7 +24,7 @@
#include "parser-defs.h"
/* The character we use to represent the completion point. */
-#define COMPLETE_CHAR '\001'
+constexpr char COMPLETE_CHAR = '\001';
namespace ada_exp_parser
{
@@ -39,8 +39,8 @@ OPER ([-+*/=<>&]|"<="|">="|"**"|"/="|"and"|"or"|"xor"|"not"|"mod"|"rem"|"abs"
EXP (e[+-]{NUM10})
POSEXP (e"+"?{NUM10})
-/* This must agree with COMPLETION_CHAR below. See the comment there
- for the explanation. */
+/* This must agree with COMPLETE_CHAR in ada-exp-parser.h. See the
+ comment on ada_parse_state::returned_complete for the explanation. */
COMPLETE "\001"
NOT_COMPLETE [^\001]